Can I reference my EJB layer objects from my web service layer?
posted 4 years ago
I have a 2-tier application in a EAR file, consist of EJB3/persistence layer (.jar) and a CXF2/webservice layer (.war). The webservice layer need to use the EJB3 beans from the EJB layer to provide web services to the front-end clients.
The EJB layer compiled ok. I also configured the webservice layer to use the ejb layer using a "provided" reference in the pom.xml file.
However I encountered an error when I compile the web service layer. I don't understand why the webservice layer try to resolve class reference to the Persistence apis.
Here is the error:
here is the place where I use EJB objects:
In my pom.xml file, I have the following reference to the ejb layer:
The EAR is going to be deployed in JBOSS AS7.
Is there anything wrong with my architecture and what is wrong with my project setup?