Accessing beans through the remote interface is working well.   Within the 
container I want to have a bean access another bean - I think via the local 
interface (but I'll take what I can get).  However i get a null reference back 
- any ideas what I am doing wrong?


  private static IMyoneLocal getMyone() throws ClassCastException, 
NamingException {
    return (IMyoneLocal) PortableRemoteObject.narrow(
        getBean(), IMyoneRemote.class);
  }
  
  private static Object getBean() throws NamingException {
    if (ctx == null) {
      ctx = new InitialContext();
    }
    String beanName = "MyoneBean/local";
    Object ref = ctx.lookup(beanName);
    return ref;
  }

Is there anything special I need to meet the requirements of the context - 
seems unlikely given that I am in the container?

thanks



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

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

Reply via email to