3 Replies Latest reply on Sep 2, 2012 10:01 AM by michele mazzei

    which is the best way to test modular EB project ?

    michele mazzei Newbie

      Hi to all, Im a newbie on Arq and Jboss, I have a question (don't' know if it has a sense....).


      I would like to know which is the best way to test a modular project (based on EJB) using Arquillan .

      Suppose I have an ear with the following strucuture:


      --- entities.jar

      ---- services.jar (depends on entities.jar)

      --- front-end.war  (depends on services.jar and entities.jar)


      Suppose that now I have to test entities.jar; it is easy with Arquillan: I create my test.war where to put all EJBs to test, test it and deploy all in AS7.

      No problem!

      Suppose that now I have inside AS7 my EAR with its entities.jar module inside, and I have to test services.jar


      Which is the best way to do it?

      I would like to test it with Arquillan without include all the entities.jar EJBs in my test.war, and I would like to executes my services.jar tests without reloading every time my entities.jar EJBs:

      I would like to install and load entities.jar only once and run my services tests on it without reloading all entities every time.


      Thus I created the test.war with an explicit dependency to deployment.EAR.ear.entities.jar and it was ok for class loading, but all the EJBs created inside entities.jar were not available inside test.war (the same problem was for CDI): I only could see the classes inside entities.jar (thanks to jboss-modules!) but cannot load EJBs (error message: NO EJB found with interface of type.....).


      I think that the problem is that the EJBs are not visible outside the EAR, so finally I can see all modules but cannot see them using the EJB and CDI driver.


      So finally, how can I test a single EJB module loading all its EJBs dependencies?, i.e.  how can I see all the EJBs already installed in the test environment?

      Do I have to use remote EJBs and JNDI?


      thank you