I'm currently having trouble reobtaining a reference to a sfsb, myself. Unfortunately, I've tried every method listed in this thread. :)
My initial (perhaps naive) approach was to stick a reference to the bean in the HttpSession, but after approximately 2-5 minutes method invocations via that reference go to a new bean. I tried putting it in JNDI with something like the following: Putting in: | IntitialContext ctx = new InitialConext(); | SFSB bean = (SFSB)ctx.lookup(SFSB.class.getName()); | ctx.bind(httpSession.getId(), bean); | Retrieving: | IntitialContext ctx = new InitialConext(); | SFSB bean = (SFSB)ctx.lookup(httpSession.getId()); | This approach threw no exceptions, but invoking methods against these references always went to different beans. I've also tried putting the reference in a static HashMap<SessionID,Bean>, but this approach has the same trouble as putting it directly in the session (i.e. after 2-5 minutes method invocations go to a new bean). I even tried using sessionContext.getEJBObject().getHandle(); and storing *that* in the session; unfortunately it was always null. I'm using EJB3 on JBoss 4.0.3SP1. Does anyone have any suggestions? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913134#3913134 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913134 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
