I searched for a while, and I cannot find a solution, the problem is this:
- I have an EJB3 application deployed in jBoss 6.0 with ejb removed.
- I have a web application (JSF 2.0) deployed in Tomcat 6.0.
I do not want to run the tomcat web application in jBoss, its application is running tomcat, and the architecture should remain the same.
I don’t want to search for EJB manually (I want to insert it), in other words, I don’t want to do it like this:
Properties properties = new Properties(); properties.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); properties.setProperty("java.naming.provider.url", "jnp://localhost:1099"); properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); Context c = new InitialContext(); MySB mySB = (MySB) c.lookup("MySB/remote");
I need to inject jBoss EJB into managed beans in a Tomcat application like
@EJB(name="MySB/remote") protected MySB mySB;
as if MySB/remote is in the local tomcat JNDI, but in fact it is being viewed from jBoss JNDI backstage.
perhaps?
source share