I have one webservice project and one EJB 3.0 project deployed in Tomee plume in same EAR. From webservice class i'm calling EJB bean class using remote interface. i have used multiple InitialContextFactory object, but nothing seems to work . Each time i'm getting
javax.naming.NameNotFoundException: Name "TestRemote" not found
while deployment, this log is coming in server.
08-Sep-2017 16:23:09.587 INFO [main] org.apache.openejb.assembler.classic.JndiBuilder.bind Jndi(name=TestRemote) --> Ejb(deployment-id=Test)
Here is the code from my webservice class
Properties properties = new Properties();
properties.put("java.naming.factory.initial", "org.apache.openejb.core.OpenEJBInitialContextFactory");
properties.put("java.naming.provider.url", "http://localhost:8081");
InitialContext ic = new InitialContext(properties);
TestRemote PSBR = (TestRemote) ic.lookup("TestRemote");
Apart from OpenEJBInitialContextFactory, i have tried org.apache.openejb.core.LocalInitialContextFactory and RemoteInitialContextFactory but getting the same error each time.