Re: jonas 5.1.5 jsp to ejb3 lookup issue
"Hans J. Prueller" <[email protected]> Tue, 08 Feb 2011 08:30:28 +0100
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Organization | LBS logics GmbH |
| Message-ID | <1297150228.2123.11.camel@kodos> |
Hi, this identical stuff works for me with JOnAS 5.2. How is your SLSB defined / annotated? regards, Hans Am Dienstag, den 08.02.2011, 08:16 +0100 schrieb [email protected]: > Hi friends, > > I try to access an ejb3 stateless sb from my jsp using this code: > > private static final String JNDI_NAME = "org.mfri.jonas.smtp.SendSMTPBean" > + "_" + SendSMTPInterface.class.getName() + "@Remote"; > > Context initialContext = null; > try > { > initialContext = new InitialContext(); > } > catch (NamingException e) > { > // TODO Auto-generated catch block > e.printStackTrace(); > } > SendSMTPInterface theSendmailInterface = null; > try > { > theSendmailInterface = (SendSMTPInterface) > initialContext.lookup(MailClientBean.JNDI_NAME); > } > catch (NamingException e) > { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > I get: javax.naming.NameNotFoundException: > org.mfri.jonas.smtp.SendSMTPBean_org.mfri.jonas.smtp.SendSMTPInterface@Remote > > The JNDI name should be ok according to the ejb3 programming doc. > > any ideas? > > Thanks Matthias