Hi It works, ensure you have a beans.xml in each jar + about annotations check your need but @applicationscoped is tempting.
Finally sharing your exception can help too Le 5 mars 2013 21:39, "James Green" <[email protected]> a écrit : > I've spent the past year developing a Java EE 6 application with JAX-RS and > JAX-WS endpoints. Each of these are annotated @Stateless. > > The project exists currently as a single maven project of war packaging > type. I would like to split this up by tier - web, service, database - as I > suspect many other people do things this way to spread workload between > staff. > > My "service" layer is currently a set of POJOs. They are @Injected into the > web service layer. Similarly, the database layer is @Injected into the > service layer. > > Two questions emerge and I'd like some experienced voices on the matter. > > 1. Should I be able to push the service and database classes down into a > separate jar file, and have the existing war project depend on that? > > 2. Should the service and database (DAO) layers have any container > annotations? > > This is a bit of a loaded question since I tried to push down the service > and database tiers of one of my java packages but it blew up during > deployment with the likes of > > http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/IllegalProductException.html > > Bear in mind that our database is MongoDB, so I have no need for EJBs for > transaction and I'm not using EJB for security either, hence beyond the web > tier everything is CDI. > > Thanks for your time in advance. > > James >
