Win a copy of Spark in Action this week in the Open Source Projects 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Deployment query

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The .war file goes in the web container and the ejb project goes in the ejb container.Where does the .jar file containg .java classes reside?
For example i have a web project,ejb project and a java project.The .java file in my java project are used by the web project to look up ejb's in the ejb project.So where does this .java file reside? In the ejb container or in the web container and how does it work if it resides in the ejb container,i mean how does the web project gets hold of it?
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gavi,
It resides where it is first loaded. In this case, the web application's classloader would load the jar.
 
Gavi Raaghav
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.So according to you it would be in the web container.But if an ejb is going to use it then how does it cross the boundary from ejb container to the web container since this .java file is in the web container.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the jar file is to be used by the EJB , then when the EJB jar is being created this file should also be included.

Hope this helps.
 
Jeanne Boyarsky
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gavi,
If both the EJBs and Web classes are using it, the jar goes in the EAR file (root of the ear) and is referenced by both modules. If the jar is just used to look up the EJBs (as I originally understood your post), the EJBs do not need to be able to reference it.
 
Don't play dumb with me! But you can try this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic