Michael Gronau [
https://community.jboss.org/people/Michael_Gronau] created the discussion
"Re: How to close remote ejb/jndi connections"
To view the discussion, visit:
https://community.jboss.org/message/724604#724604
--------------------------------------------------------------
Hi jaikiran,
I'm just doing it like this:
| |
this.ejbClientProperties.setProperty("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED",
"false"); |
| | this.ejbClientProperties.setProperty("remote.connections",
"default"); |
| |
this.ejbClientProperties.setProperty("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS",
"false"); |
| // |
this.ejbClientProperties.setProperty("remote.connection.default.connect.options.org.xnio.Options.SASL_MECHANISMS",
"PLAIN"); |
| |
this.ejbClientProperties.setProperty("remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS",
"JBOSS-LOCAL-USER"); |
| | this.ejbClientProperties.setProperty("remote.connection.default.host" ,
this.host); |
| | this.ejbClientProperties.setProperty("remote.connection.default.port",
Integer.toString(this.port)); |
| | this.ejbClientProperties.setProperty("callback.handler.class",
AnonymousSaslClientCallbackHandler.class.getName()); |
| | Hashtable jndiProperties = new Hashtable(); |
| | |
| | jndiProperties.put(Context.URL_PKG_PREFIXES,
"org.jboss.ejb.client.naming"); |
//
| | this.ejbNamingContext = new InitialContext(jndiProperties); |
then i simply look up the ejb's via this.ejbNamingContext.lookup(...)
I debugged a little bit around and when i close the ejbNamingContext there is no special
code executed to close the underlying connections, because the context is an instance of
javax.naming.InitialContext, which does nearly nothing in its close() method.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/724604#724604]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]