Is JBOSS' JNDI implementation brain-dead ... or am I missing something?

I took an .ear file that runs happily in the j2ee-ri and deployed it to 
jboss.  Unhappily, I've been bombarded with NamingExceptions.

After many frustrated attempts to resolve them, I finally went to the 
InitialContext and NamingEnumeration api's, and System.out.println'ed my way 
to the following discovery:

<code>

InitialContext ic = new InitialContext();

//---------------------------------------------------
// jboss FAILS, throwing a NamingException;
/   (but other app servers don't fail)
//---------------------------------------------------
String className = (String) 
ic.lookup("java:comp/env/subscriber/SubscriberDAOClass");

// --------------------------------------------------
// jboss makes me drill down to the naming context
//   before doing the lookup, forcing me to take 2 steps,
//  ie, THIS WAY:
// --------------------------------------------------
Context myCts = (Context) ic.lookup("java:comp/env/subscriber");
String className = (String) myCts.lookup("SubscriberDAOClass");

</code>

Do I have to go back through my whole codebase and change the way I'm doing 
these lookups?  (sigh)

Thanks for any hints that will allow me to leave my codebase as is.  Plus, 
why can't jboss' jndi handle this?

Chris

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to