• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can a EJB module reference a WEB module?

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks!

Is it possible for a EJB module to reference a WEB module?
In the same EAR there is a EJB module (.jar) and a web module (.war).
The classes in the EJB module use classes in the WEB module.
But everytime I deploy the EAR and test the EJBs, 9iAS throws a ClassNotFoundException from the EJB.

I already tried to use a MANIFEST file in EJB.jar but I don't know which value I have to insert in the Class-Path attribute to reference classes in the web module.

Any help would be appreciated.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Luciano,
This seems to me to be more of a design question (about ejb modules referencing web modules), so I'm moving it to:
J2EE

Why does your ejb module need to refer to a web module? Does the web module also refer to the ejb module? You want to avoid circular dependencies.

Without knowing more about your situation, it looks like a refactoring is in order. The classes that are used by both the ejb module and web module can be moved to a separate "common" project/jar file. That way the structure is clearer and you don't have the awkward dependency structure.
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic