I'm not a Weblogic expert (Gene Chuang is) but I think <jndi-name>MyAdminHome</jndi-name>
Should be <jndi-name>ejb/MyAdminHome</jndi-name> Or alternately, drop the "ejb/" from the lookup. >From within EJBs, the path "java:comp/env/" is implied. HTH, Juan Pablo Lorandi Chief Software Architect Code Foundry Ltd. [EMAIL PROTECTED] Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com > -----Original Message----- > From: A mailing list for Enterprise JavaBeans development > [mailto:[EMAIL PROTECTED]] On Behalf Of Rahul Aras > Sent: Wednesday, April 17, 2002 9:11 AM > To: [EMAIL PROTECTED] > Subject: ENC lookup problems > > > Hi All , > > I have a stateless session ejb which is NOT referencing any > other ejbs. I just wish to perform a JNDI lookup via ENC and > this is how I am doing it. I have successfully deployed it on > Weblogic 6.1 server. > > Context ctx = new InitialContext(); > Object obj = > ctx.lookup("java:comp/env/ejb/MyAdminHome");//throws an Exception > > BUT > > Object obj = ctx.lookup("MyAdminHome");//works fine > .... > .... > > > But it gives me an Exception saying > > Unable to resolve comp/env/ejb/SMProCardSpendAdminHome > Resolved: 'comp/env' Unresolved:'ejb' > > The ejb-jar.xml looks like this > <ejb-jar> > <enterprise-beans> > <session> > <ejb-name>MyAdminBean</ejb-name> > <home>com.abc.xyz.ejb.MyAdminHome</home> > <remote>com.abc.xyz.ejb.MyAdmin</remote> > <ejb-class>com.abc.xyz.ejb.MyAdminBean</ejb-class> > <session-type>Stateless</session-type> > <transaction-type>Container</transaction-type> > </session> > </enterprise-beans> > </ejb-jar> > > and the weblogic-ejb-jar.xml looks like this > > <weblogic-enterprise-bean> > <ejb-name>MyAdminBean</ejb-name> > <stateless-session-descriptor> > <pool> > > <max-beans-in-free-pool>100</max-beans-in-free-pool> > > <initial-beans-in-free-pool>5</initial-beans-in-free-pool> > </pool> > </stateless-session-descriptor> > <jndi-name>MyAdminHome</jndi-name> > </weblogic-enterprise-bean> > > Where am I faltering? Can anybody please point out? I saw the > petstore weblogic deployment descriptor for the Customer > session bean but couldnt understand how the ENC lookup was > working there. > > - Rahul > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body of the message "signoff EJB-INTEREST". > For general help, send email to [EMAIL PROTECTED] and > include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
