Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find version of EJB for existing web application?

 
prashant gandhi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 138
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
prashant gandhi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep. I am using 2.0. ejb-jar.xml says that clearly in first 2 lines... thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic