Jonathan Gibbons wrote: > Could it be the JNDI name you use? You say you are calling this from the Login >bean? As in an EJB or a Gui bean?
In my talk bean = EJB :) sometimes can be confusing.. If you see my latest post about subject you see that I found what was causing it. It was not JNDI name, or anything in deployment descriptors. Reason was that I had superclas EJB that all my ejbs extended and in that class I had helper functions that made looking up beans and other stuff prettier :) So when bean object came to state where it needed to lookup other bean it stepped into superclasses code and created IntialContext ...but that context was not correct context for Login session bean. When changed it so that InitialContext was created inside LoginBean.java and then passed into stuff in superclass EJB.java it worked correctly. So it seems that code that receives InitialContext must be in real bean class code and not in other class that is extended by bean class, even at execution time object is same. > > The rules are: > > >From the web tier use: > > ic.lookup("ejb/InwardSLSBRef"); > > (except I had problems using ejb/ in a past interation, so dropped it) > > >From the same java JVM, eg looking up data sources > > ic.lookup("java:"); > hmm... in my code I never use anything starting with "java:" my beans lookup everything linked into their context by simly using "ejb/X" or "jdbc/X", and client code just lookups for full jndi name "shepherd/stuff/X" > > >From within an EJB, or session bean > > ic.lookup("java:comp/env/ejb/InwardSLSBRef"); > actually this is incorrect, in that way that it works but it is not necessary. from ejb (entity or session) you can lookup stuff in its context by just using "ejb/InwardSLSBRef", that "java:comp/env" is not necessary. -- jK.MkIII _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user