|
From: Tim M. <tec...@mo...> - 2004-01-06 13:32:20
|
MacMahon, Mark wrote:
> Hi All,
>
<snip>
>
> I am also getting problems passivating the SFSB due to the fact that
> AbstractEnterpriseBean stores its logger as a member rather than a class
> variable:
> Is this convenience really worth sacrificing serializable support?
>
> abstract class AbstractEnterpriseBean implements EnterpriseBean
> {
>
> /** Logger, available to subclasses */
> protected final Log logger = LogFactory.getLog(getClass());
>
> //Change to static to support serializable
> //private final static Log logger =
> LogFactory.getLog(AbstractEnterpriseBean.class);
>
> }
>
I am working along with Mark on this issue and now have some further
points to note:
I see that there is now a note on the "logger" variable that it should
be reinitialised during activation for a stateful session bean. This has
been implemented (logger set to null during passivation) but we now
receive the following error during passivation:
javax.ejb.EJBException: Could not passivate; failed to save state;
CausedByException is:
org.springframework.aop.framework.Cglib2AopProxy
at
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:378)
at
org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:85)
I have even set the logger on the Cglib2AopProxy to a static variable
but this did not help.
I do reiterate Mark's comments about the loggers used in the Spring
code. It would be much easier to use these classes if the loggers were
static. It may require a little more code placed in to initialise a
logger for the subclasses but the resulting stability would be worth it.
Currently it looks like we'll have to stop using Spring's stateful
session bean until it can be passivated successfully.
Once again, thanks for a great framework and looking forward to 1.0!
Tim McAuley
|