Weird behaviour on SSB: String[] variables disspearing when
cruinne Sep 23, 2005 7:50 AMHello everyone,
We are suffering from a very strange problem on one of our Stateful Session Beans running in a JBoss 3.2.4 server:
The bean implementation class for our EJB inherits from an abstract class which contains a protected variable of class String[].
This variable is initialized in the abstract class as:
protected String[] MY_ENTITY_TYPES = new String[] {}
And lately, in an "init" method in the child implementation class (which is called from its constructor) this array is given a set of values.
Everything goes well as long as the bean is never passivated during normal operation but, if this happens, when it is activated again... the MY_ENTITY_TYPES variable becomes an empty array!
Nevertheless, the child class has another variable, of type boolean, which is activated with the correct value... this only happens with the String[] variable in the abstract class...
This is a fragment of log from the activation moment:
2005-09-22 01:15:22,818 INFO [inventory.oss.facade.JVTResourceInventorySessionEJB] Constructor: Initializing class variables... 2005-09-22 01:15:22,819 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@b528d 2005-09-22 01:15:22,819 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: /home/jboss/project-jboss-server/server/default/tmp/sessions/JVTResourceInventorySession-edmstqal-4/edw2zkok-jqn.ser 2005-09-22 01:15:22,819 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Session state: inventory.oss.facade.JVTResourceInventorySessionEJB@158ba7e 2005-09-22 01:15:22,819 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Removing passivated state file: /home/jboss/project-jboss-server/server/default/tmp/sessions/JVTResourceInventorySession-edmstqal-4/edw2zkok-jqn.ser 2005-09-22 01:15:22,819 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Activation complete; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@b528d 2005-09-22 01:15:22,820 WARN [inventory.oss.facade.JVTResourceInventorySessionEJB] WARNING: Initialized values lost bug detected. Proceeding with walkaround. Exception message reads: ManagedEntity type inventory.entities.CircuitViewValue is not supported.
We're quite lost here, to be sincere... we don't know whether this has to do with the fact that it is a protected variable, that it resides in an abstract class... whichever the reason, it cannot be an issue related to the variables not being serializable, as a String[] should be serializable...
Any ideas/comments?
Thank you very much.
Cru.