[jboss-user] [EJB 3.0] - I have remote working - but need a reference to a local bean
aron-smith
do-not-reply at jboss.com
Mon Jul 31 12:34:37 EDT 2006
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
More information about the jboss-user
mailing list