Question & Answer
Question
Is it possible to dynamically detect if the EJBDeploy tool has been installed in an existing WAS v8.x installation ?
Cause
The EJBDeploy tool for pre-EJB 3.0 modules is now an optional install as part of WebSphere Application Server v8.x using the Installation Manager. In versions prior to WAS v8.0 the EJBDeploy tool was automatically installed with the WAS product. Historically, EJB deployment in the WebSphere Application Server product has been performed by the EJBDeploy tool, which was included with WebSphere Application Server and packaged with the development tools for the WebSphere products. If an application contains EJB's earlier than 3.0 than the installation will require that the EJBDeploy tool be installed in order to deploy the application containing the pre-EJB 3.0 EJBs.
Answer
Yes, you can dynamically detect if the optional EJBDeploy tool has been installed in a WAS v8.x installation. Below are five different ways to determine if the EJBDeploy tool for pre-EJB 3.0 modules is installed:
1) versionInfo.bat or versionInfo.sh command
This command is located in the WAS_ROOT\bin directory. One of the sections in the output of the command is Installed Product. One of the elements of this section is Installed Features. If the optional EJBDeploy tool for pre-EJB 3.0 modules feature was installed it would appear in the list of Installed Features. If the optional feature was not installed then it would not appear in the list of Installed Features.
Sample output of this command is shown below:
C:\WASv8\WebSphere\AppServer\bin>versionInfo.bat
WVER0010I: Copyright (c) IBM Corporation 2002, 2005, 2008; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.47, dated 10/18/11
--------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------
Report at date and time June 4, 2013 11:56:21 AM EDT
Product List
---------------------------------------------------------------------------
ND installed
Installed Product
---------------------------------------------------------------------------
Name IBM WebSphere Application Server Network Deployment
Version 8.0.0.4
ID ND
Build Level cf041228.02
Build Date 7/12/12
Package com.ibm.websphere.ND.v80_8.0.4.20120712_1714
Architecture x86 (32 bit)
Installed Features IBM 32-bit SDK for Java, Version 6
EJBDeploy tool for pre-EJB 3.0 modules
Embeddable EJB container
Stand-alone thin clients and resource adapters
---------------------------------------------------------------------------
From the versionInfo.bat command output, in the Installed Features section, it can be determined that the EJBDeploy tool for pre-EJB 3.0 modules was installed.
2) genVersionReport.bat command
This command is located in the WAS_ROOT\bin directory. When this command is run it will generate a file named versionReport.html in the same directory by default. In the output of the versionReport.html file will be a section titled Installed Product. One of the elements in this section is Installed Features and will list EJBDeploy tool for pre-EJB 3.0 modules if the optional feature was installed.
3) AdminServerManagement.viewProductInformation() Jython query script
The Jython query script, installed with WAS v8, can also provide output which will indicate if the EJBDeploy tool for pre-EJB 3.0 modules feature was installed. The AdminServerManagement.py script is located in the WAS_ROOT\scriptLibraries\servers\V70 directory. The name of the server management procedure in the script is "viewProductInformation". Information about this script can be found in the following WAS v8 InfoCenter section:
- Server query scripts:
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-dist&topic=rxml_7libserver2
An example of the output from the AdminServerManagement.viewProductInformation() Jython script from a WAS v8.0 installation is:
C:\WASv8\WebSphere\AppServer\bin\> wsadmin -lang jython
wsadmin>AdminServerManagement.viewProductInformation()
---------------------------------------------------------
AdminServerManagement: Showing server version
Usage: AdminServerManagement.viewProductInformation()
Return: If the command is successful, a value of 1 is returned.
---------------------------------------------------------
---------------------------------------------------------------
IBM WebSphere Product Installation Status Report
---------------------------------------------------------------
Report at date and time June 4, 2013 10:09:02 AM EDT
Installation
---------------------------------------------------------------
Product Directory C:\WASv8\WebSphere\AppServer
Version Directory C:\WASv8\WebSphere\AppServer\properties\version
DTD Directory C:\WASv8\WebSphere\AppServer\properties\version\dtd
Log Directory C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager\logs
Product List
-----------------------------------------------------------------
ND installed
Installed Product
-----------------------------------------------------------------
Name IBM WebSphere Application Server Network Deployment
Version 8.0.0.4
ID ND
Build Level cf041228.02
Build Date 7/12/12
Package com.ibm.websphere.ND.v80_8.0.4.20120712_1714
Architecture x86 (32 bit)
Installed Features IBM 32-bit SDK for Java, Version 6
EJBDeploy tool for pre-EJB 3.0 modules
Embeddable EJB container
Stand-alone thin clients and resource adapters
-------------------------------------------------------------------
End Installation Status Report
-------------------------------------------------------------------
1
wsadmin>
From the jython script output, in the Installed Features section, it can be determined that the EJBDeploy tool for pre-EJB 3.0 modules was installed.
4) Using wsadmin Jacl commands
To produce the output using Jacl you will need to run two AdminControl commands to achieve the desired output. The first Jacl command identifies the server and assigns it to a server variable (ie myserver). The second Jacl command queries the server version. The server version information is stored in the serverVersion attribute. The getAttribute command returns the attribute value of a single attribute, passing in the attribute name.
Below are the two Jacl commands which can be used to display this information (you will need to provide your server name and node name as it will be different):
wsadmin>set myserver [$AdminControl completeObjectName type=Server,name=server1,node=wccbld14Node05,*]
WebSphere:name=server1,process=server1,platform=proxy,node=wccbld14Node05,
j2eeType=J2EEServer,version=8.0.0.4,type=Server,mbeanIdentifier=cells/
wccbld14Node04Cell/nodes/wccbld14Node05/servers/server1/server.xml
#Server_1183122130078,cell=wccbld14Node04Cell,spec=1.0,processType=UnManagedProcess
wsadmin>$AdminControl getAttribute $myserver serverVersion
-----------------------------------------------------------------
IBM WebSphere Product Installation Status Report
-----------------------------------------------------------------
Report at date and time June 4, 2013 10:25:27 AM EDT
Installation
-----------------------------------------------------------------
Product Directory C:\WASv8\WebSphere\AppServer
Version Directory C:\WASv8\WebSphere\AppServer\properties\version
DTD Directory C:\WASv8\WebSphere\AppServer\properties\version\dtd
Log Directory C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager\logs
Product List
-----------------------------------------------------------------
ND installed
Installed Product
-----------------------------------------------------------------
Name IBM WebSphere Application Server Network Deployment
Version 8.0.0.4
ID ND
Build Level cf041228.02
Build Date 7/12/12
Package com.ibm.websphere.ND.v80_8.0.4.20120712_1714
Architecture x86 (32 bit)
Installed Features IBM 32-bit SDK for Java, Version 6
EJBDeploy tool for pre-EJB 3.0 modules
Embeddable EJB container
Stand-alone thin clients and resource adapters
-------------------------------------------------------------------
End Installation Status Report
-------------------------------------------------------------------
From the Jacl command output, in the Installed Features section, it can be determined that the EJBDeploy tool for pre-EJB 3.0 modules was installed.
More information on these two Jacl commands can be found in the WAS v8.0 InfoCenter section:
- Obtaining server version information with scripting:
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_information.html
5) Installation Manager eclipse directory
From within the Installation Manager tools subdirectory, use the "imcl.exe listInstalledPackages -features" command to generate a list of all the installed packages that Installation Manager has installed. The output of this command will contain "ejbdeploy" if the optional tool was installed. Similar to the other options, if "ejbdeploy" is not in the output of the command then the optional tool was not installed.
Here is sample output of the "imcl.exe listInstalledPackages -features" command run from a WAS v8.0.0.4 installation on Windows machine:
C:\Program Files (x86)\IBM\Installation Manager\eclipse\tools>imcl.exe listInstalledPackages -features
com.ibm.cic.agent_1.6.2000.20130301_2248:
com.ibm.rational.application.developer.v80_8.0.4001.RADO804iFix1-I20120127_2338:
com.ibm.rad.birt,com.ibm.rad.code_review,com.ibm.rad.jee5,com.ibm.rad.llcc,
com.ibm.rad.pde,com.ibm.rad.tptp,com.ibm.rad.viz_editors,
com.ibm.rad.was70_devtools,com.ibm.rad.was80_devtools,
com.ibm.rad.webtools.basic,com.ibm.rad.webtools.jee.basic,
com.ibm.rad.webtools_core
com.ibm.websphere.ND.v80_8.0.4.20120712_1714 : com.ibm.sdk.6_32bit,ejbdeploy,embeddablecontainer,thinclient,
8.0.0.4-WS-WAS-IFPM71296_8.0.4.20120824_1342
8.0.0.4-WS-WASProd-IFPM69940_8.0.4.20120803_1427
From the above output we see the ejbdeploy feature is listed as one of the Installed Features.
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21639618