JBoss Community

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

created by Oliver Katzer in JBoss AS 7 Development - View the full discussion

System.setProperty("jboss.ejb.client.properties.file.path", "C:\\jboss-ejb-client.properties"); // Content of the file I posted already.

 

Properties properties = new Properties();

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

Context jndiContext = new InitialContext(properties);

 

 

Object ref = jndiContext.lookup( "ejb:/MtzWebComm//CommEJB!de.miditec.communication.ejb.CommEJBHome");

CommEJBHome commEJBHome = (CommEJBHome) PortableRemoteObject.narrow(ref, CommEJBHome.class);

 

CommEJB commEJB = commEJBHome.create(1);

 

System.out.println( commEJB.getHello() );

commEJB.remove();

 

So, it's similar to your code.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community