Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb access war file classes

 
peter mcp
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to access classes in a web application from an ejb.
The ejb and web application are deployed within the same ear file.
I am unsure whether i should place the required classes from the war file within the ejb.jar so the ejb can access them ?
any ideas would be appreciated
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
What type of classes does your ejb need to access from the war?

Make sure referencing the war would not introduce a circular dependency (as the war likely accesses the ejb.) If this is the case, you can put the common classes in a separate utility project.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic