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.