Skip to content

How To: use Libra in AS 7

wolfc edited this page Aug 16, 2012 · 2 revisions

Using Libra in AS 7 involves two steps:

  1. Create a module called org.jboss.libra
  2. Configure boot configuration to use this module

Create module org.jboss.libra

Create the proper directory structure and put the jar into place.

$ mkdir -p $JBOSS_HOME/modules/org/jboss/libra/main
$ cp jboss-libra.jar $JBOSS_HOME/modules/org/jboss/libra/main/

Within the main module directory you should create a module.xml descriptor file as such:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.jboss.libra">
    <resources>
        <resource-root path="jboss-libra.jar"/>
    </resources>
</module>

Set boot configuration

Add the following line to the top of $JBOSS_HOME/bin/standalone.conf:

JBOSS_MODULES_SYSTEM_PKGS="org.jboss.libra"

This ensures that each component and deployment in AS 7 has access to Libra.

Right now an issue exists in AS 7 that prevents the usage of the Attach API way of starting Libra. Instead the javaagent command line argument should be used by adding the following to the end of standalone.conf:

JAVA_OPTS="$JAVA_OPTS -javaagent:../modules/org/jboss/libra/main/jboss-libra.jar"
Clone this wiki locally