Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Deployment query  RSS feed

 
Gavi Raaghav
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?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • 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.
 
andra kan
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
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!