Installation on JBoss AS

Installation on JBoss AS

Upgrading the Javassist Module

orientdb-object-1.3.0 depends on javassist-3.16.1-GA which is not compatible with the version javassist-3.15.0-GA integrated into JBoss AS 7.1.x, AS 7.2.x and EAP 6.1.x. To work with the OPS4J Orient Resource Adapter, you need to upgrade the Javassist module in your JBoss installation.

  • Get javassist-3.16.1-GA.jar from Maven Central and copy it to $JBOSS_HOME/modules/org/javassist/main

  • Edit module.xml in that directory, changing the resource-root element to

<resource-root path="javassist-3.16.1-GA.jar"/>

Disclaimer: This upgrade might have negative side effects on your JBoss AS server as a whole. Proceed at your own risk.

Configuring the Resource Adapter

Edit $JBOSS_HOME/standalone/configuration/standalone.xml and add a new <resource-adapter> element to <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">:

<resource-adapter> <archive> orient-rar-0.1.0.rar </archive> <transaction-support>LocalTransaction</transaction-support> <connection-definitions> <connection-definition class-name="org.ops4j.orient.adapter.impl.OrientManagedConnectionFactoryImpl" jndi-name="orient/ConnectionFactory" enabled="true" use-java-context="true" pool-name="OrientConnectionFactory"> <config-property name="connectionUrl"> local:/path/to/your/orientdb </config-property> <config-property name="type"> object </config-property> </connection-definition> </connection-definitions> </resource-adapter>

You can add multiple connection definitions, one for each OrientDB database used by your applications, with appropriate Connection Properties, defined in <config-property> elements.

Deploying the Resource Adapter

Get the artifact org.ops4j.orient:orient-rar:0.1.0:rar from Maven Central or build it locally and deploy it to JBoss by any of the usual methods.

Adding a Dependency to your Application

Add a dependency on the resource adapter to your application, to make sure that the resource adapter is deployed before your own application, e.g. by creating a file WEB-INF/jboss-deployment-structure.xml with the following contents:

<jboss-deployment-structure> <deployment> <dependencies> <module name="deployment.orient-rar-0.1.0.rar" /> </dependencies> </deployment> </jboss-deployment-structure>

Tested Versions

  • JBoss AS 7.1.3.Final (built from tag)

  • JBoss AS 7.2.0.Final (built from tag)

  • JBoss EAP 6.1.0