I have deployed applications like below in the domain mode
MyWebApp.war ---> which has web tier
MyEjb.jar --> which has all ejbs
service.jar --> from where ejb is invoked
Both are deployed in the domain mode.
and while invoking the same I use
java:global/MyEjb/...
This works but I want to know the performance impact as it is deployed on the same server. And also what needs to be changed if I want to access it as local.
As If I access it with java:app/MyEjb/..
It is not able to find the bean.
And also, If i am invoking the ejb from same server and using below code
Hashtable Props = new Hashtable();
Props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.as.naming.InitialContextFactory");
Props.put(Context.PROVIDER_URL, "remote://localhost:4447");
Props.put("jboss.naming.client.ejb.context", Boolean.valueOf(true));
Why to use "remote" in this case? Is there any other way to call locally?
My objective is to invoke the ejb locally since everything is running on the same JVM.