I'm having the following issue. An application written for JBoss tries to refer 
to its beans when locating them through JNDI using the following pattern:


  | ctx = new InitialContext(System.getProperties());
  | ctx.addToEnvironment("java.naming.factory.initial", 
"org.jnp.interfaces.NamingContextFactory");
  | ctx.addToEnvironment("java.naming.factory.url.pkgs", 
"org.jboss.naming:org.jnp.interfaces");
  | ctx.addToEnvironment("java.naming.provider.url", "localhost:1099");
  | FooBean = (FooBean) ctx.lookup("PROJECTNAME/FooBean/remote");
  | 

and the bean is not found. if I reset the last call to:


  | FooBean = (FooBean) ctx.lookup("FooBean/remote");
  | 

it finds it without problems.

on startup, JBoss initializes all beans automagically according to the log:


  | 14:10:13,159 INFO  [JmxKernelAbstraction] creating wrapper delegate for: 
org.jboss.ejb3.stateless.StatelessContainer
  | 14:10:13,168 INFO  [JmxKernelAbstraction] installing MBean: 
jboss.j2ee:jar=PROJECTNAME.jar,name=FooBean,service=EJB3 with dependencies:
  | 14:10:13,342 INFO  [EJBContainer] STARTED EJB: com.foo.bar.FooBean ejbName: 
FooBean
  | 

how can I make the code work as in the original setup, i.e. make the JDNI refer 
to these objects by the name "PROJECTNAME/FooBean/remote"?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053496#4053496

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053496
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to