facebook

EJB and Web deployment class sharing?

💡
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 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #232008 Reply

    I have an EJB that depends on my Web project but for some reason when I deploy, none of the Web classes make it to the EJB project. Of course, this then causes the EJB not to work.

    Can I do this in MyEclipse?

    #232028

    Riyad Kalla
    Member

    We don’t currently support this relationship of EJB->Web, what you will need to do is create an enterprise application that has the EJB and web projects as modules and then deploy that.

    #232029

    That’s what I did, but it doesn’t copy the Web projects classes to the EJBs classes folder when it deploys.

    #232040

    Riyad Kalla
    Member

    The classes won’t be jumbled together like that, the app server will handle the proper class loader hierachy for your entire EAR so your web app can load and use your EJB’s without them existing under the same physical folder.

    #232043

    It doesn’t. 🙂

    I’m using weblogic 8.1. Is there something I need to tell it?

    #232046

    I figured it out. 🙂 I had to add the web projects classpath tot he MANIFEST.MF for the ejb.

    #232047

    Riyad Kalla
    Member

    Good catch and thank you for posting your solution, it helps oethers in the same boat.

    #232070

    carniz
    Member

    Better solution: put the common parts (the ones in the Web module) that you want to use in the EJB in a plain java module. The java module can then be put in the root of the EAR, just like the EJB and Web (pointed out by a <java>mymodule.jar</java> tag)

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: EJB and Web deployment class sharing?

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