This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic