![]() |
![]() |
![]() |
![]() |
![]() |
||||
![]() |
Home | Download | Lists | Issues |
![]() |
||||||
![]() |
![]() |
![]() |
![]() |
![]() |
||||
Local Client (embedded container)Properties p = new Properties(); p.put("java.naming.factory.initial", "org.openejb.client.LocalInitialContextFactory"); InitialContext ctx = new InitialContext(p); MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote"); Remote ClientProperties p = new Properties(); p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "ejbd://localhost:4201"); // user and pass optional p.put("java.naming.security.principal", "myuser"); p.put("java.naming.security.credentials", "mypass"); InitialContext ctx = new InitialContext(p); MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote"); Remote Client with HTTP (openejb standalone)Properties p = new Properties(); p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "http://localhost:4204"); // user and pass optional p.put("java.naming.security.principal", "myuser"); p.put("java.naming.security.credentials", "mypass"); InitialContext ctx = new InitialContext(p); MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote"); Remote Client with HTTP (in tomcat)Properties p = new Properties(); p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "http://127.0.0.1:8080/openejb/ejb"); // user and pass optional p.put("java.naming.security.principal", "myuser"); p.put("java.naming.security.credentials", "mypass"); InitialContext ctx = new InitialContext(p); MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote"); |
![]() |
|||||||
|
![]() |