Okay for those of you interested in the work around to my
problem (listed below).
I think the servlet init method only gets called once no
matter how many instances of the servlet exist. Hence,
when you remove the ejb there is nothin re-creating
it.
Solution: before calling the bean make sure it is not
equal to null, if it is re-create it. Also when you remove() it, make sure
you set it to null.
That's all.
If anyone disagrees with my logic please let me
know.
Ricardo
Hello I have been trying to look for info on this problem
and I have notfound anything useful.Let me describe my
problem.I have an applet that accesses a servlet that in turn
communicates with anEJB.in the Applet.destroy() I send a request to
my servlet called "endSession"this gets handled by my servletwich in
turn calls the local reference of my beans remove method that
isbeanLocal.remove();This appears to end the session just fine, but
when I try and make use ofthat bean again it gives me the following
error:16:03:11,181 ERROR [AbstractInstanceCache] Activation
failurejavax.ejb.EJBException: Could not activate; CausedByException
is:C:\Programme\jboss-3.0.1\server\default\db\sessions\Controller\1036594697323.ser
(Das System kann die angegebene Datei nicht
finden)
atorg.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:239)
atorg.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:83)
atorg.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:177)
atorg.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212)
atorg.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
atorg.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
atorg.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
atorg.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
atorg.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContaineetc.I've
read in some places that this has to do with the max-bean-age in theconfig
file.As I understand it one you call this method there is a discrepancy
betweenwhat was passivated and what the new ejb localobject.I
don't really understand this problem as I am able to call the
beanRemote.remove() method without getting the above error stack.So
my question is how can I end the EJB session when the applet isdestroyed?
and why can't I use the beanLocal.remove()
method.Thancks,Ricardo