Deutsch | English

How-To: Deploy ECMSDK on JBoss WildFly

After you installed your ECMSDK software and created the ECMSDK schema inside your Oracle Database, you can deploy an ECMSDK Node inside a JEE container of your choice. If you want to deploy ECMSDK on a JBoss WildFly AS, you need to follow the steps below.

  1. First is to register an Oracle JDBC driver as a new module in WildFly. This driver will be used for the DataSource that an ECMSDK Node uses when deployed inside a JEE container.

    1. Create the following folder structure under your WildFly installation home, hereafter referred as $JBOSS_HOME

      cd $JBOSS_HOME/modules
      mkdir -p oracle/jdbc/main

    2. Upload the ojdbc6.jar shipped with ECMSDK to the folder $JBOSS_HOME/modules/oracle/jdbc/main

    3. Create a new file named module.xml inside the folder $JBOSS_HOME/modules/oracle/jdbc/main with the following content

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">
      <resource-root path="ojdbc6.jar"/>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>

    4. Restart your WildFly server to read the new module configuration

    5. Your new Driver should now be listed inside your standalone.xml or domain.xml, depending on the mode you are starting your WildFly with.
      The entry should look similar to this:

      <driver name="OracleJDBCDriver" module="oracle.jdbc"/>

  2. We can now create our DataSource which manages the database connection to the ECMSDK repository

    1. Access the WildFly Management Console UI and navigate to Configuration --> Subsystems --> Datasources --> Non-XA

    2. Click the Add Button to create a new DataSource

    3. Choose Oracle Database from the list of DataSources, then click Next

    4. Enter a Name for your DatabaSource, i.e. OracleDS

    5. Enter the following JNDI Name: java:/jdbc/OracleDS, then click Next
      !! If you specify a different JNDI Name here than jdbc/OracleDS please read Step 5.c. carefully

    6. Select Detected Driver tab on the screen to get a list of registered JDBC drivers. This should list at least two drivers, h2 and OracleJDBCDriver

    7. Select OracleJDBCDriver, then click Next

    8. Enter the Connection Settings for the ECMSDK schema. This information can be retrieved from the file located under $ECMSDK_HOME/lib of your ECMSDK installation
      Connection URL:
      Username: ecmsdk
      Password: ecmsdk
      After entering the Connection Settings then click Next

    9. Click Finish on the Summary Screen

  3. As a validation step you can select the Datasource after the creation and choose Test Connection.

  4. Your new DataSource should now be listed inside your standalone.xml or domain.xml, depending on the mode you are starting your WildFly with.
    The entry should look similar to this:

    <datasource jta="true" jndi-name="java:/jdbc/OracleDS" pool-name="OracleDS" enabled="true" use-ccm="true">
    <valid-connection-checker class-name=""/>
    <stale-connection-checker class-name=""/>
    <exception-sorter class-name=""/>

  5. Now, after we successfully set up our DataSource for ECMSDK, we can deploy the ECMSDK Node to WildFly

    1. First we need to prepare the ecmsdk.war that is shipped with the ECMSDK installation under $ECMSDK_HOME/lib. Copy the following JAR files into the WEB-INF/lib folder inside the ecmsdk.war file

      • xmlparserv2.jar

      • orai18n.jar

      • orai18n-mapping.jar
        (The JAR files can be found under $ECMSDK/lib as well.)

    2. Add a new file into the WEB-INF folder of the ecmsdk.war file called jboss-deployment-structure.xml. This file should have the following content:

      <?xml version="1.0" encoding="UTF-8"?>
      <module name="oracle.jdbc" slot="main"/>
      !! This file is important, as it lists dependencies to already existing WildFly modules. If you don't add this file to your ecmsdk.war you can receive one of the following exceptions: ClassCastException, NoClassDefFoundError

    3. In addition to the above, you might need to change the DataSource name attribute in the web.xml of the ecmsdk.war file, if you configured a different JNDI Name in Step 2.e. than the default jdbc/OracleDS.

      <description>The name of the DataSource for the ECMSDK repository</description>

    4. Save your changes to ecmsdk.war

    5. Upload ecmsdk.war as a new deployment through your JBoss WildFly management console UI

  6. To verify your deployment, you can check the DefaultNode.log under $JBOSS_HOME/bin for any errors.

This documentation was tested with JBoss AS product: WildFly Full 10.1.0.Final