[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Cant get <on-load> working  XML
Forum Index -> Terracotta for Web Sessions
Author Message
erezhara

master

Joined: 08/01/2007 02:36:19
Messages: 57
Offline

i have setup a transient field with an on-load event using an execute element.
however, when the object is materialized on a new node the script is not run.
using 2.4 stable1.
where am i being wrong here?

<instrumented-classes>
<include>
<class-expression> com.magicsoftware.ibolt.portal.core.ENSessionContext
</class-expression>
<honor-transient>false</honor-transient>
<on-load>
<execute>
<![CDATA[
System.out.println("ENSessionContext on-load");
self.setCurrentUser(self.mCurrentUserName);
]]>
</execute>
</on-load>
</include>
<include><class-expression>*..*</class-expression></include>
</instrumented-classes>

<transient-fields>
<field-name> com.magicsoftware.ibolt.portal.core.ENSessionContext.mCurrentUser
</field-name>
</transient-fields>
[Email]
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

The *..* include is taking precedence - the file is read bottom up or you can think of it as last one wins. In any case you should move the wildcard to the top not the bottom of the list of expressions.

Speaking of the wildcard include - you should take that out of your config. To do so, run your application with the config as specified and run the admin console. You will find that the admin console has a list of classes that are being shared - use this list to configure the Terracotta config with only the classes you need as opposed to all classes.
[WWW]
erezhara

master

Joined: 08/01/2007 02:36:19
Messages: 57
Offline

indeed :-)
10x
[Email]
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team