File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Can I reference my EJB layer objects from my web service layer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can I reference my EJB layer objects from my web service layer?" Watch "Can I reference my EJB layer objects from my web service layer?" New topic
Author

Can I reference my EJB layer objects from my web service layer?

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Hi,

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?

Any suggestion is very appreciated.
Thanks
Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I reference my EJB layer objects from my web service layer?