JBoss Community

Re: EJB bean is not working in Multi threading of JBoss 7.1.1 Final

created by Bijoy James in JBoss AS 7 Development - View the full discussion

I think now my problem solved and its working fine.

 

I used below code

 

  objProperties = new Properties();

  objProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

  objProperties.put(Context.PROVIDER_URL, "remote://" + Url);

  objProperties.put("jboss.naming.client.ejb.context", true);

  objProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

  jndiContext  = new InitialContext(objProperties);

 

  obj = jndiContext.lookup("JMSRa/JMSRA!Home.JMSRAHome");

  /*

  * jar name is JMSRa

*/

  home = (JMSRAHome) PortableRemoteObject.narrow(obj, JMSRAHome.class);

  objRemote = home.create();

 

jndiContext.close();

 

If am not using jndiContext.close();  means my application is not working, I don’t kno what’s the reason

 

And "jboss-ejb-client.properties" in the client application class path also.

 

In the “jboss-ejb-client.properties” file I used below properties

     remote.connections=default

     remote.connection.default.host=localhost

     remote.connection.default.port=4447

     remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

     remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

 

Thanks for Wolf-Dieter Fink and Oliver Katzer for your valuable helps


Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community