File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB 3.1 - Deploying EJBs through a WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB 3.1 - Deploying EJBs through a WAR file" Watch "EJB 3.1 - Deploying EJBs through a WAR file" New topic
Author

EJB 3.1 - Deploying EJBs through a WAR file

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys,

I went through the postings at theserverside and I'm concerned on one of the following features in EJB 3.1. We can deploy our EJB's in the same location where we deploy our servlets meaning they do not have to be in a seperate jar file. What would it mean to Application Servers like Weblogic and the controvercial App/Web container Tomcat?


[Edited by Jaikiran - Changed the original subject line "Question on EJB 3.1"]
[ December 17, 2008: Message edited by: Jaikiran Pai ]

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Jothi, I'm moving your thread to the EJB forum.


[My Blog]
All roads lead to JavaRanch
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
160

Originally posted by Jothi Shankar Kumar Sankararaj:
We can deploy our EJB's in the same location where we deploy our servlets meaning they do not have to be in a seperate jar file. What would it mean to Application Servers like Weblogic and the controvercial App/Web container Tomcat?

From the serverside discussion:

Support for direct use of EJBs in the servlet container, including simplified packaging options. The current thought is to allow EJBs in the WEB-INF/classes directory while allowing ejb-jar.xml to reside in the WEB-INF directory, just like the web.xml file.

I don't know why this approach is being proposed. I don't see a reason why the Enterprise Java Beans are being proposed to be deployed through a WAR file. The only reason i can think of is, maybe to avoid creating an EAR. I'll have to read the JSR to understand more.

However, do note that you can still package the EJBs in a separate jar (within the WEB-INF/lib). Here's the next sentence from that quote:

In a similar vein, you would be able to place an EJB jar into the WEB-INF/lib directory.


[My Blog] [JavaRanch Journal]
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Jothi,

What specifically are you concerned about? In this case, Java EE app servers would support EJBs packaged in EJB-JAR/EAR as well as just a WAR? Are you aware app servers today have to support standalone WARs just as Tomcat, Jetty, etc do?

Regards,
Reza


Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Originally posted by Reza Rahman:
Jothi,

What specifically are you concerned about? In this case, Java EE app servers would support EJBs packaged in EJB-JAR/EAR as well as just a WAR? Are you aware app servers today have to support standalone WARs just as Tomcat, Jetty, etc do?

Regards,
Reza


My concern is we can use Tomcat for deploying EJB's which is really amazing!
Dmitry Zhelezov
Greenhorn

Joined: Dec 29, 2008
Posts: 3
Originally posted by Jothi Shankar Kumar Sankararaj:


My concern is we can use Tomcat for deploying EJB's which is really amazing!


Have you considered OpenEJB for this? I've read in
this article that it's pretty simple, however, I have no experience with it. Besides, you probaly need JTA implementation, and JOTM is good enough for middle-sized applications, but anyway has limited functionality.
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Dmitry,

Actually, you do not need JOTM with OpenEJB and Tomcat. OpenEJB comes with a JTA implementation.

I still don't quite understand what the issue with being abe to use EJB 3 in Tomcat or some other lightweight application server is? In fact, Java EE 6 profiles are aiming to make is possible to have lighter versions of WebLogic, WebSphere, GlassFish, JBoss, etc? What's the concern?

Best regards,
Reza
 
jQuery in Action, 2nd edition
 
subject: EJB 3.1 - Deploying EJBs through a WAR file
 
Similar Threads
Custom Deployers not workning in Jboss 5
Tomcat for EJB 3.1 Specifications
Why EJB 3, vs Hibernate, etc.
Difference between *Applications* and *Web Applications* ??
can't find data source: java:/OracleDS