• 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

placing ejb and web modules

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !
Please help me. Basically if our application contains EJB and Web modules, we would make a ".jar" and ".war" file respectively and pack them in an ".ear" and deploy in the server. But I have the following problem.
I have an application where my web modules have bean classes which help in getting respective EJBs. For this I have to import those ejb packages as well; So I want to know that what should be the composition of the war file?? Should I include the ejb package in the ".war" file??
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can have the ejb class files bundled in the ear in the following path

WEB-INF\classes
 
Naapa Sekhar Ramesh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, there is a typo in my previous reply.

You can have the ejb class files bundled in the .war file in the following path

WEB-INF\classes
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Diwakar,

Actually you should not have to worry. The default classloader behavior for an EAR is that EJBs are loaded in the Application classloader and each Web app is loaded in its own child classloader. So if you JavaBeans are in the WAR (WEB-INF/classes or WEB-INF/lib directory) they will be able to use the localhome and local (or remote) interfaces since they will have been loaded by the parent or Application classloader. There is no need to copy the EJB classes into the WAR.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic