12.7.1 Configuring MySQL for manually installed JBoss

To enable JBoss to connect to the MySQL database that stores AEM forms data, you must complete these tasks.

  • Obtain and copy the MySQL JDBC driver to the instance of JBoss where you will deploy AEM forms.

  • Create a data source file and deploy it to the instance of JBoss where you will deploy AEM forms.

  • Encrypt the password in the data source files ( adobe-ds.xml and mysql-ds.xml ) and the login-config.xml file using one of the methods described at http://community.jboss.org/wiki/EncryptingDataSourcePasswords. You can also use the instructions available on http://blogs.adobe.com/livecycle/2009/10/livecycle_-_encrypting_clearte.html.

If you are using Adobe-preconfigured JBoss, see Configuring MySQL for Adobe-preconfigured JBoss 4.2.1.

12.7.1.1 Configuring the MySQL data source

Before you configure the MySQL data source, you must have the database created on MySQL. (See Creating a MySQL database.)

12.7.1.2 Set MySQL as the data source

  1. Navigate to the [appserver root] /server/<profile_name>/deploy directory and delete the hsqldb-ds.xml file.

  2. Navigate to the [appserver root] /docs/examples/jca directory and copy the mysql-ds.xml file to the [appserver root] /server/<profile_name>/deploy directory.

  3. Open the [appserver root] /server/<profile_name>/deploy/mysql-ds.xml file in a text editor and modify the <local-tx-datasource> element with your MySQL connection settings:
    <jndi-name>MySqlDS</jndi-name> 
    <connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url> 
    <driver-class>com.mysql.jdbc.Driver</driver-class> 
    <user-name>x</user-name> 
    <password>y</password>
  4. Replace the bold values with values that are specific to your database:

    • MySqlDS : Change to DefaultDS .

    • mysql-hostname , 3306 , jbossdb , x , and y: The database values that the application server uses to access the database.

  5. Save and close the file.

12.7.1.3 Edit the standardjbosscmp-jdbc.xml file

  1. Open the [appserver root] \server\<profile_name>\conf\<profile_name>jbosscmp-jdbc.xml file and change the following elements (not necessarily contiguous):

    <!-- optional since 4.0 <datasource-mapping>Hypersonic SQL </datasource-mapping> --> 
        <fk-constraint>false</fk-constraint>
    • Remove the text <!-optional since 4.0 and the trailing --> comment tagfrom the <datasource-mapping> tag to uncomment it.

    • Replace Hypersonic SQL with mySQL in the <datasource-mapping> element.

    The final <datasource-mapping> tag will look like the following line:

    <datasource-mapping>mySQL</datasource-mapping>
    • Replace false with true in the <fk-constraint> element.

  2. Save and close the file.

12.7.1.4 Edit the lc_turnkey.xml file

  1. Open the [appserver root] \server\<profile_name>\conf\login-config.xml file in a text editor and add the following text within the <authentication> element:

    <security-domain name="EncryptDBPassword"> 
                        <authentication> 
                            <login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required"> 
                                <module-option name="userName" value="adobe"/> 
                                <module-option name="password" value="-3bfaa32dfe43f65b207a6df87216de44"/> 
                                <module-option name="managedConnectionFactoryName" value="jboss.jca:name=DefaultDS,service=LocalTxCM"/> 
                            </login-module> 
                        </authentication> 
                    </security-domain> 
              <security-domain name="EncryptDBPassword_IDP_DS"> 
                        <authentication> 
                            <login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required"> 
                                <module-option name="userName" value="adobe"/> 
                                <module-option name="password" value="-3bfaa32dfe43f65b207a6df87216de44"/> 
                                <module-option name="managedConnectionFactoryName" value="jboss.jca:name=IDP_DS,service=LocalTxCM"/> 
                            </login-module> 
                        </authentication> 
                    </security-domain> 
            <security-domain name="EncryptDBPassword_EDC_DS"> 
                        <authentication> 
                            <login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required"> 
                                <module-option name="userName" value="adobe"/> 
                                <module-option name="password" value="-3bfaa32dfe43f65b207a6df87216de44"/> 
                                <module-option name="managedConnectionFactoryName" value="jboss.jca:name=EDC_DS,service=LocalTxCM"/> 
                            </login-module> 
                        </authentication> 
                    </security-domain>
  2. Replace the bold values with values that are specific to your database:

    Note: For Oracle RAC, replace adobe with the service name specific to your database.
  3. Save and close the file.

  4. Start JBoss.

// Ethnio survey code removed