Hi,

I have a stateful session bean that has a private transient field which is the 
LocalHome interface of another session Bean (a stateless one).

I instanciate a proxy by invoking a private method from within the stateful session 
bean as in the following extract:


  | private transient MySessionBeanLocalHome privateField;
  | ...
  | private MySessionBeanLocalHome getMySessionBeanLocalHome() {
  |    if (privateField == null) {
  |       privateField = MySessionBeanUtil.getLocalHome();
  |    }
  |    return privateField;
  | }
  | 

In the ejbPassivate() method of the stateful session bean, I call the 
getMySessionBeanLocalHome() private method and I get a ClassCastException when the 
session bean passivate (here below the stacktrace I get).

I don't understand what happens. Any idea ?

The stacktrace:

  | 12:26:10,922 ERROR [synch.driver.ScannerSynchSessionBean] [801018530188-K / 
32000110] Could not passivate
  | java.lang.ClassCastException
  |         at 
com.kiala.kserver.synch.driver.helper.ScannerConnectionLoggerUtil.getLocalHome(ScannerConnectionLoggerUtil.java:54)
  |         at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.getScannerConnectionLoggerHome(ScannerSynchSessionBean.java:698)
  |         at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.rollbackSynchAndLogFailure(ScannerSynchSessionBean.java:464)
  |         at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.ejbPassivate(ScannerSynchSessionBean.java:671)
  |         at 
com.kiala.kserver.synch.driver.ScannerSynchSession.ejbPassivate(ScannerSynchSession.java:20)
  |         at 
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:371)
  |         at 
org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:85)
  |         at 
org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:151)
  |         at 
org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:447)
  |         at 
org.jboss.ejb.plugins.LRUStatefulContextCachePolicy$RemoverTask.run(LRUStatefulContextCachePolicy.java:143)
  |         at java.util.TimerThread.mainLoop(Timer.java:432)
  |         at java.util.TimerThread.run(Timer.java:382) 
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848985#3848985

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848985


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to