[jboss-user] [EJB 3.0] - stateful session bean - access works but every time new one,
stephan.opitz
do-not-reply at jboss.com
Sat Sep 16 08:49:09 EDT 2006
if i lookup from my application for a stateful session, i get one:
try {
Context context = new InitialContext();
sessionFacade = (SessionFacade) context
.lookup("shale-clay-mailreader/" + SessionBean.Local);
// "shale-clay-mailreader/SessionBean/Local"
} catch (NamingException e) {
e.printStackTrace();
}
problem is after a request the lookup is away and a new one will be created...
i used jsf and saved the reference in a bean which had an applications scope session
so i could have my stateful session bean until i destroy it with @Remove
but why i have to save the reference?
is not the advantage that a stateful session bean knows and saves the depending client
?
or should it be - and while walking from request to request the jndi lookup creates new instead of get the old one, because the client looklike changed
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972100#3972100
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972100
More information about the jboss-user
mailing list