facebook

War creation problem(dependent EJB stubs not getting copied)

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

    Hi

    I have developed and a project with the following configuration

    – Common Java Project
    – EAR dependency – EJBApp, Common Java Project
    – WAR dependency – EJBApp(partial EJB interfaces), Common Java Project

    When i create the war it does not copy the interfaces even when i have configured the dependency in the “Java Build Path — Projects” configuration pane. Also i have checked it in the “Java Build Path — Order and Export” tab. and changed the war preferences by enabling all the dependency options to copy the jars, dep project jars, user libs etc.

    How can we automatically copy ebj interfaces to the web module?

    Regards
    Ruchir

    #226406 Reply

    Riyad Kalla
    Member

    Ruchir,
    You will need to remove the Web > EJB dependency and instead create an Enterprise Project that marks the EJB and Web projects as modules, and then deploy that.

    #226459 Reply

    Hi Riyad

    My requirement is to deploy the war and the EJBApp(packaged as ear) on two different machines. So i can not create and enterprise project with both of them as modules. I have to have the war independent of the ear.

    Regards
    Ruchir

    #226473 Reply

    Riyad Kalla
    Member

    Ruchir,
    I asked one of our devs about this and this is what he had to say:

    Since his WAR and EAR, which contains his EJB, need to be on different
    machines, then his EJB interfaces really do need to be packaged with his WAR
    also. In a “normal” app, where everything is in the EAR, the WAR gets
    access to the EJB interfaces due to the classloader hierarchy that the spec
    mandates.

    In this case, if he wants automatic deployment, I’d suggest placing the EJB
    interfaces by themselves in a plain Java project and marking it as a
    dependency of both the EJB project and the WAR. That should ensure they get
    deployed. If he tells MyEclipse which files those are by placing them in a
    library project and then making the EJB and WAR projects depend on it, it
    should package the way he wants.

    Does that help?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: War creation problem(dependent EJB stubs not getting copied)

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