[jboss-dev-forums] [JBoss AS 7 Development] - Re: How to close remote ejb/jndi connections
Michael Gronau
do-not-reply at jboss.com
Mon Mar 19 04:30:48 EDT 2012
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&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120319/ea9afa32/attachment.html
More information about the jboss-dev-forums
mailing list