Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt regarding EJB jar  RSS feed

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have created a EJB in ejb 2.1 and one web application which uses that ejb.

now is it possible to create a jar file and use it as library in my web application ? like we have struts jar file for struts framework. the same way i have a framework built in that ejb. so can i create a jar file and include it in my web application/WEB-INF/lib folder and use it ? and then create a EAR file for that web application and deploy it on application server(Web Logic) something like that ?

If it is possible what are the things which i need to take care. what contents(like ejb-jar.xml, weblogic-ejb-jar.xml) should go where ?

I am new to EJB
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to my findings and understanding...

1) i need to create jar file containing all the classes of EJB excluding the content of META-INF folder.
2) content of META-INF will go into Web Applications/META-INF/ directory.

But one more doubt, will ejb get deployed as this time it will be in WAR file inside EAR. instead of EAR directly.

 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An EJB client JAR can go in your web applications WAR file. This is the EJB client code only and most likely will depend upon the application server's client libraries as well.

The actual EJB JAR file is not part of the web application. This file is used to deploy the EJB in the application server.

Whether you use a EAR file or not depends upon your design. There are a few different ways to deploy an EJB component and a web component and there are different application server-specific traits that need to be considered as well.

Good luck!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!