[Glass] External tasks do not recognize new methods after commit - only after restart !?!?!?!?!

Dale Henrichs dale.henrichs at gemtalksystems.com
Thu Oct 29 10:02:45 PDT 2020


Marten,

You have submitted an HR and we'll use the HR to characterize and 
resolve your issue, but since you asked a question on this list, I will 
fill in some details about how things work here so that other developers 
are informed.

You mention in the HR that you added a method to CharacterCollection ... 
and since I assume that you are running as DataCurator, that means that 
session methods are involved ... session methods are special in that 
extension methods that you add to classes in Globals as DataCurator (or 
any other non-SystemUser user) are not added directly to the method 
dictionary of the class, but stored in a separate dictionary (this is 
done because you do not have the right permissions to write to the 
method dictionaries of the classes in Globals).

The method dictionary and methods, like all persistent objects are 
updated at commit boundaries, but in our vms, copies of the persistent 
methods are installed in method caches for performance reasons. When a 
method is modified during a commit, the method cache for all other 
sessions are refreshed at commit boundaries.

Session methods use a different caching mechanism and  that is were 
things are apparently breaking down in your system.

In GLASS, the class SessionMethodTransactionBoundaryPolicy is used to 
track changes to session methods. An instance of 
SessionMethodTransactionBoundaryPolicy is installed at login at the same 
time that the session method "caches" are filled, when session methods 
are enabled.

The instance of SessionMethodTransactionBoundaryPolicy is notified at 
each transaction boundary and if any other session has made a change to 
the session methods, then the session method caches are cleared and 
reset ...

Soooo, the fact that new (and changed?) session methods are not being 
updated on transaction boundaries, means that something has gone wrong 
with the installation of SessionMethodTransactionBoundaryPolicy or with 
the logic for refreshing the session method caches on transaction 
boundaries...

As I said before, we'll work on addressing your specific issues via the 
HR system, but if anyone else has any questions, let me know.

Dale


On 10/29/20 12:42 AM, Marten Feldtmann via Glass wrote:
> I noticed a problem I've never seen before:
>
> I am working with Gemstone/S 3.5.1 and Jade 2.4.6. My development 
> cycle is the following:
>
> * Full Gemstone/S application is running with several answering 
> Gemstone/S tasks (http)
> * I change code in Jade and do a commit
> * Then I execute something in our UI application to test the changes
>
> This works very well - but today I noticed, that when I add a new 
> method and call it in my application the answering tasks throw an 
> error and tell me, that they do not understand the new method. I've 
> never seen this before :-(
>
> When I shut down the database and restart the application again 
> everything is ok ... up to the time when I add a new method and want 
> to execute it in the ansering tasks.
>
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20201029/e76af5a5/attachment.htm>


More information about the Glass mailing list