remote ejb
yakimaman Mar 21, 2014 10:10 PMHas anyone been successful using remote ejb with Wildfly 8 final? My code no longer works (worked on alpha4 as I recall).
The document @ EJB invocations from a remote client using JNDI - WildFly 8 - Project Documentation Editor states the following:
"Before getting into the details, we would like the users to know that we have introduced a new EJB client API, which is a WildFly-specific API and allows invocation on remote EJBs. This client API isn't based on JNDI. So remote clients need not rely on JNDI API to invoke on EJBs. A separate document covering the EJB remote client API will be made available."
Has anybody seen that document?
The only other documentation I have found is the very confusing article linked to just above the quoted verbiage.
Would it be possible for somebody who knows what is going on to do the document referenced that will be for the EJB client API only without confusing the issue with the remoting project? I need to know what configuration if any is required and the code to connect to a stateful ejb. No combination I have been able to extract from the documentation has worked.
My context creation code is as follows:
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL, "remote://192.168.3.93:8080");
jndiProps.put(Context.SECURITY_PRINCIPAL, "myname");
jndiProps.put(Context.SECURITY_CREDENTIALS, "my_password");
jndiProps.put("jboss.naming.client.ejb.context", true);
jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
try {
context = new InitialContext(jndiProps);
} catch (NamingException ex) {
Logger.getLogger(ClientConstants.class.getName()).log(Level.SEVERE, null, ex);
}
try {
myBean = (NewSessionBeanRemote) context.lookup("ejb:PlatformServer/PlatformServer-ejb//NewSessionBean!com.yrs.server.NewSessionBeanRemote?stateful");
} catch (NamingException ex) {
Logger.getLogger(ClientConstants.class.getName()).log(Level.SEVERE, null, ex);
}
Thanks for any advice.