Thursday, November 22, 2012

How to find out JBoss Versions

My group is working on a way to perform C&A on JBOSS. The method discussed here did not work as expected with JBOSS EAP 5.1 and JBOSS AS Community 6.0.1. After poking around a bit I found that the $JBOSS_HOME/bin/run.sh script will tell you the version. For C&A purposes it's nice to have a quick method to get answers so we have been using the following find statement:




find $JBOSS_HOME -name run.sh -exec {} -V \;
grep '^JBoss'

JBoss 5.1.1 (build: SVNTag=JBPAPP_5_1_1 date=201105171607)



Unfortunatily, if you are working with SCAP this method is useless since there is no definition that I am aware of that allows for the execution of a shell script. But you can use the Independent Definition 5.10.1 1/27/2012 ind:xmlfilecontent test to extract the JBoss version from the $JBOSS_HOME/jar-versions.xml:





name: applet.jar

specVersion: 5.1.1

1.1.1 Hot deploy copying jar (in standalone mode, not suggested in domain mode)


The easiest way to hot deploy a driver in standalone mode is to copy the jar into the $JBOSS_HOME/standalone/deployments (don’t forget to read the README.located there!). If you are copying a jdbc 4 compliant driver you will get a message like this into console where you have started the standalone server:



12:59:17,663 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "mysql-connector-java-5.1.15.jar"

12:59:18,191 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

12:59:18,291 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "mysql-connector-java-5.1.15.jar"1.1.2 Deploy a driver using jboss-admin.sh command line tool

Standalone: Start the server in standalone mode, open another console, launch the jboss-admin.sh tool. Run these commands:



[standalone@localhost:9999 /] connect

Closed connection to localhost:9999

Connected to standalone controller at localhost:9999

[standalone@localhost:9999 /] deploy /dati/drivers/mysql-connector-java-5.1.15.jar

'mysql-connector-java-5.1.15.jar' deployed successfully.You will get an output to server running console identical to one pasted in section 1.1.1.



Domain: Start the server in domain mode, pen another console, launch the jboss-admin.sh tool. Run these commands:



[standalone@localhost:9999 /] connect

Closed connection to localhost:9999

Connected to domain controller at localhost:9999

[domain@localhost:9999 /] deploy --all-server-groups /dati/drivers/mysql-connector-java-5.1.15.jar

'mysql-connector-java-5.1.15.jar' deployed successfully.You will get this output to server running console:



[Server:server-one] 13:07:51,933 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "mysql-connector-java-5.1.15.jar"

[Server:server-two] 13:07:51,934 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "mysql-connector-java-5.1.15.jar"

[Server:server-two] 13:07:52,344 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

[Server:server-one] 13:07:52,355 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

[Server:server-two] 13:07:52,441 INFO [org.jboss.as.server.controller] (pool-1-thread-1) Deployed "mysql-connector-java-5.1.15.jar"

[Server:server-one] 13:07:52,441 INFO [org.jboss.as.server.controller] (pool-1-thread-1) Deployed "mysql-connector-java-5.1.15.jar"

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.