Installation on GlassFish

Installation on GlassFish

Upgrading Javassist

This step is required for GlassFish 3.x only. For GlassFish 4.x, you can directly deploy the Orient Resource Adapter.

Disclaimer: For GlassFish 3.x, the server installation needs to be modified. This approach might have negative side effects on your GlassFish server as a whole. Proceed at your own risk.

orientdb-object-1.3.0 depends on javassist-3.16.1-GA which is not compatible with the version javassist-3.14.0-GA integrated into GlassFish 3.1.x. Things are further complicated by the fact that Javassist is not a GlassFish module of its own, but comes embedded into weld-osgi-bundle.jar.

We have tried various other options of overriding the Javassist version, but the only method that seems to work is replacing the Javassist classes embedded into the Weld bundle.

To work with the OPS4J Orient Resource Adapter, you need to replace the weld-osgi-bundle.jar module in your GlassFish installation as follows:

  • Get javassist-3.16.1-GA.jar from Maven Central and unpack it to a temporary directory temp-javassist/

  • Unpack weld-osgi-bundle.jar from glassfish/modules to a temporary directory temp-weld.

  • Remove temp-weld/javasisst/ and all subfolders.

  • Recursively copy temp-javassist/javassist to temp-weld/

  • Zip temp-weld/ and overwrite weld-osgi-bundle.jar with this archive.

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 GlassFish by any of the usual methods.

Configuring the Resource Adapter

  • Launch the Web Administration Console.

  • Navigate to Resources | Connectors | Connector Connection Pools and click on New.

  • Enter a pool name of your own choice and select orient-rar-0.1.0 from the resource adapter dropdown list. Click Next.

  • In the Additional Properties table, edit or delete the Connection Properties as needed. Click Finish.

  • Navigate to Resources | Connectors | Connector Resources and click on New.

  • Enter a JNDI name for the connection and select the connection pool you've just created. Click OK.

Tested Versions

  • GlassFish 3.1.2

  • GlassFish 3.1.2.2

  • GlassFish 4.0 (b89)