I think you've got this switched around.

<ejb-ref-mapping location="XXX" name="EmployeeBenefitManager" />

In your servlet you should always attempt to look up the name because that's
what you specified in your assembly descriptor.  Orion uses the location
attribute to link your reference to the bean which exists somewhere else in
your JNDI context.

The idea is you code your application to look for declaration in your
assembly descriptor.  You use the deployment descriptor to link you assembly
description to what ever you want.  


Andre

-----Original Message-----
From: -buttso- [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 4:15 PM
To: Orion-Interest
Subject: using ejb-ref-mapping in orion-web.xml?


g'afternoon all  - 

Has anyone ever used the <ejb-ref-mapping> tag in the orion-web.xml
file?  

>From reading the doc on the Orion website, it appears that you can
modify the JNDI name used by an <ejb-ref-mapping> entry for an EJB home
as described in the standard web.xml file.

I've got the following in my web.xml to reference a SFSB:

<ejb-ref>
  <description>benefit manager/description>
  <ejb-ref-name>EmployeeBenefitManager</ejb-ref-name>
  <ejb-ref-type>Session</ejb-ref-type>
  <home>benefit.ejb.manager.EmployeeBenefitManagerHome</home>
  <remote>benefit.ejb.manager.EmployeeBenefitManager</remote>
</ejb-ref>

>From a servlet, I can successfully lookup the EJB using the name
"java:comp/env/EmployeeBenefitManager

If I wanted to modify the JNDI name of the EmployeeBenefitManager
without messing with the web.xml, it looks like I can use the
orion-web.xml file and supply an alternate <ejb-ref-mapping> such as :

<ejb-ref-mapping location="XXX" name="EmployeeBenefitManager" />

At deployment time, I can see that this entry is added to the generated
orion-web.xml in the application-deployments directory.

However when I try to do a lookup for this object in the servlet, using
the "java:comp/env/XXX" or even just "XXX", I get a
NameNotFoundException.

Am I doing something wrong?  What name should I be using to locate the
remapped object?

Has anyone else ever used this?

Grateful for any advice.

-buttso-




__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to