wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes How to find version of EJB for existing web application? 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 "How to find version of EJB for existing web application?" Watch "How to find version of EJB for existing web application?" New topic
Author

How to find version of EJB for existing web application?

prashant gandhi
Greenhorn

Joined: May 21, 2013
Posts: 18
Hi, I am very new to EJB world. How do we find what version of EJB my current web application is using? I checked ejb-jar.xml and application.xml for uri reference. There is no such thing i found in ejb-jar.xml, and the application.xml look like below:

----------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE application (View Source for full doctype...)>
- <application>
<display-name>DTU</display-name>
<description>Application description</description>
- <module>
<ejb>dtu.jar</ejb>
</module>
- <module>
- <web>
<web-uri>dtu.war</web-uri>
<context-root>dtu</context-root>
</web>
</module>
</application>

------------------------------

we are currently using jboss 4.0.1 sp1 and JDK1.6. I am using eclipse indigo and ant for compiling existing code. Inside my java files, i do see ejbcreate(), ejbremove(), ejbpassivate() methods. Also, I see below in my .java files:


------------------------------------
* @ejb.bean type="Stateful"
* name="JobConfigSession"
* jndi-name="JobConfigSession"
*
* @ejb.ejb-ref
* ejb-name="FileService"
* view-type="local"
* ref-name="FileService"
*
* @ejb.env-entry description="The path for middle-tier files."
* name="DTUMiddleTierDir"
* type="java.lang.String"
* value="/dtu/"
*
* @jboss.container-configuration name="DTU Stateful SessionBean"
*

------------------------------------

what version of ejb am i using? The source code was written 4-5 years ago.

i also checked windows - preferences - java - classpath, but i dont seem to see any ejb versioning there. it shows: ECLIPSE_PATH, JRE_LIB, JUNIT_HOME, JUNIT_SRC_HOME etc defined there...

any help is appreciated. thanks.
Prajakta Acharya
Ranch Hand

Joined: Nov 08, 2012
Posts: 138

Hi Prashant,

Application server (on which your web application is deployed), implements EJB specs.
So, libraries provided by JBoss should tell you the EJB version is use.
Try to search any EJB specific class like Stateless or something and look at the Jar which has it included. The Jar name itself should have the specs version or you can unpack it to see its details.

If you are seeing ejbcreate etc methods and if the code is old, guess its version 2.


Regards,
Prajakta
prashant gandhi
Greenhorn

Joined: May 21, 2013
Posts: 18
yep. I am using 2.0. ejb-jar.xml says that clearly in first 2 lines... thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find version of EJB for existing web application?