I have this in my JSF backing bean:

anonymous wrote : private CadastroManagerLocal getCadastroManagerLocal(){
  |             try {
  |                     Properties p = new Properties();
  |                  p.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |                   p.put(Context.PROVIDER_URL,"jnp://localhost:1099");
  |                   
  |                     InitialContext ctx = new InitialContext(p);
  |                     Object ref = ctx.lookup("CadastroManagerBean");
  |                     return (CadastroManagerLocal) 
PortableRemoteObject.narrow(ref, CadastroManagerLocal.class);
  |         } catch (Exception e) {
  |             e.printStackTrace();
  |             return null;
  |         }
  |     }

and work fine, but when a try to inject with @EJB annotation i have nothing...


anonymous wrote : @EJB(name="CadastroManagerBean")      
  |     private CadastroManagerLocal cadastroManagerLocal;
  | 
  | or 
  | 
  | @EJB(name="mappedName")     
  |     private CadastroManagerLocal cadastroManagerLocal;

I see in the documentation that the EJB work only in "java:com/env" ENC and my 
Bean is in global jndi namespace...

This is the problem? how do i change from global to java:comp/env?:??

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

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

Reply via email to