-
1. Re: Remote lookup from MDB
adrian.brock Aug 27, 2003 1:00 AM (in response to mattygiedt)What do you get when you see when you list the enumeration
on the context.
Regards,
Adrian -
2. Re: Remote lookup from MDB
mattygiedt Aug 27, 2003 7:21 AM (in response to mattygiedt)Here is the new code:
Hashtable env = new Hashtable();
env.put( Context.PROVIDER_URL, JNDI_URL );
env.put( Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY );
env.put( Context.URL_PKG_PREFIXES, JNDI_PREFIXES );
InitialContext ctx = new InitialContext( env );
NamingEnumeration ne = ctx.list( ctx.getNameInNamespace() );
while( ne.hasMore() )
{
System.err.println( ne.next() );
}
home = (IPBrokerHome)PortableRemoteObject.narrow(
ctx.lookup("IPBrokerHome"), IPBrokerHome.class );
-------------------------------------------------
and here is the result:
08:57:36,888 ERROR [STDERR] UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction
08:57:36,888 ERROR [STDERR] invokers: org.jnp.interfaces.NamingContext
08:57:36,888 ERROR [STDERR] UserTransactionSessionFactory: org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl
--------------------------------------------------
Obviously the EJB is not in the context. That could mean (I think) two things:
1. the EJB isn't being bound to the JNDI tree in the SS JBoss instance
2. I'm not getting the right context
I know that the SS bean is being deployed as I have a test that, when run in the same JVM, can obtain the home interface to the bean through a default call to new InitialContext(). But, this isn't really accessing the JNDI tree because of the commented out line in jndi.properties, right?
So now I'm really confused.
TIA,
-Matt -
3. Re: Remote lookup from MDB
mattygiedt Aug 27, 2003 7:39 AM (in response to mattygiedt)So the problem is that the bean is not being deployed into the JNDI tree on my second JBoss instance.
Thanks for the enumeration tip!
-Matt