facebook

How do I register an EJB for use within a servlet?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #229479 Reply

    Allan_Chase
    Member

    I created an Enterprise Application project and added a couple of session beans and a servlet that accesses them. I then wanted to deploy this application to JBoss 4.x. I know technically what to do by hand with the web.xml and the jboss-web.xml, I was wondering how the beans can be added without me poking around in the web deployment descriptors and having to remember all the <ejb-ref> tags. I added XDoclet to both the EJB and Web project and it was able to generate the files and it works great for the EJB deployment jboss.xml, but only generates a template for the web.xml and jboss-web.xml and has place holders for where you could put the EJB refs. I looked through many examples, but they usually do a Web project OR an EJB project and not both (that I could find).

    #229494

    Riyad Kalla
    Member

    In the case of deploying both, you want to create an Enterprise Application Project, and add the EJB and Web projects as modules to that and then deploy the EAR: http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/

    As for the EJB specific question, I will ask our EJB dev to have a look.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How do I register an EJB for use within a servlet?

You must be logged in to post in the forum log in