Thanks Andy. I changed to the remote tomee client with http per following
code. I'm obviously not connecting all the dots somewhere because I just
get the following message:
org.apache.openejb.client.ClientRuntimeException: Invalid response from
server: -1
IF I discover how this works, THEN I may be able to suggest how the docs may
have been more helpful. But right now I'm just confused.
CODE SECTION FOLLOWS
private void fetchDatabaseConnection() throws ConnectionException {
Properties p = new Properties();
p.put("java.naming.factory.initial",
"org.openejb.client.RemoteInitialContextFactory");
// p.put("java.naming.provider.url", "ejbd://192.168.3.93:4201");
// this
works when openejb is started
p.put("java.naming.provider.url",
"http://192.168.3.93:8080/tomee/ejb");
// user and pass optional
// p.put("java.naming.security.principal", "chuck");
// p.put("java.naming.security.credentials", "dosomething");
InitialContext ctx = null;
try {
ctx = new InitialContext(p);
} catch (NamingException ex) {
Logger.getLogger(ClientConstants.class.getName()).log(Level.SEVERE, null,
ex);
}
try {
myBean = (NetworkLedgerServerRemote)
ctx.lookup("NetworkLedgerServerRemote");
} catch (NamingException ex) {
Logger.getLogger(ClientConstants.class.getName()).log(Level.SEVERE, null,
ex);
}
if(myBean == null) {
System.out.println("myBean is null after lookup");
}
}
--
View this message in context:
http://openejb.979440.n4.nabble.com/Running-EJB-and-non-EJB-applications-in-one-Tomcat-tp4668479p4669016.html
Sent from the OpenEJB User mailing list archive at Nabble.com.