Binding ejb to JNDI is done in the web.xml of your web-app. You add:

    <ejb-ref>
      <ejb-ref-name>ejb/EJBName</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <home>yourpackage.EJBHome</home>
      <remote>yourpackage.EJBRemote</remote>
    </ejb-ref>

Replace the EJBName with the name of the EJB ref you want to get in your
servlet or JSP. Replace EJBHome and EJBRemote with the names of your home
and remote ejb class names.

Happy coding.



> -----Original Message-----
> From: Papo Napolitano [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 10, 2001 4:21 PM
> To: [EMAIL PROTECTED]
> Subject: build.xml and EJB
>
>
> Hi all!
>
> I'm trying to write a webapp with JSP and EJB. I've wrote my own
> EJB called
> usermanager and I tested in my machine (localhost). In this case
> a made the
> deploy with the deploytool from Sun.
> Now I want to install it in my server (Tomcat 4.06b / J2EE). I tried to
> deploy my webapp with the ant but I don't know how to bound my bean to a
> JNDI name.
>
> Cheers
> Papo.
>

Reply via email to