0 Replies Latest reply on Mar 8, 2013 2:26 PM by jsperafico

    Detach Dynamic Web from EJB and JPA project

    jsperafico

      Hi everyone!

       

      If is possible, I need some help to do something trickie.

      This may be simple, but I had been trying to solve it for 3 days in a row without a success.

      Google is my best friend, but I was unable to find the solution with it.

      I use the Eclipse IDE to program whom allow me to create 4 different projects for JEE as

      following Enterprise Application Project, JPA Project, EJB Project and Dynamic Web Project.

       

      With that in mind I would like to create the following structure:

      EAR Project containing

      EJB Project

      Web Project

      JPA Project

       

      Is this actual possible? My intention to do it, is the reusability and modulation. JPA has the

      database objects, EJB has the business controller, Web has view it self, and I can use them

      as many times as I want to.

       

      I tested all sort of configurations withou success, for me the most logical would be adding the

      EBJ, JPA and WEB to EAR project by right-click on the EAR project it self, following by properties,

      deployment assembly, add EJB and JPA to lib folder and WEB to standard folder. If I do that,

      the EJB project is unable to use the JPA data. And if I put the EJB to the standard folder,

      the WEB project is unable to use EJB data.

       

      Also after that I want to add to the EAR a JAXB project for the REST api, so if you can help me with

      that too, I apreciate it.

       

      I really do not want to combine the EJB into the WEB project, beacuse I want to create a

      Application Client Project, just to be more challenger.

       

      Thank you for the help,

      Jonathan Pinto Sperafico