You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage pattern for JNDI is:
InitialContext initialContext = new InitialContext( env )
try {
// do something with the context;
}
catch ( Exception e ) {
// handle exceptions
}
finally {
// cleanup resources
initialContext.close();
}
In case a shared context is used (org.osjava.sj.jndi.shared=true) the second
client won't see any bound instances, since the first client (registering the
object) calls close() in its finally block.
The question really comes down to what the semantics of InitialContext#close()
is. The javadocs is not really clear about this. See also
http://stackoverflow.com/questions/5120961/context-and-initialcontext-should-i-b
e-calling-the-close-method-on-these-obje
Original issue reported on code.google.com by hardy.fe...@gmail.com on 12 Aug 2011 at 1:14
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
hardy.fe...@gmail.com
on 12 Aug 2011 at 1:14The text was updated successfully, but these errors were encountered: