Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Copiar el driver de mysql en <o3>/classes/jdbc/
  2. Crear el module dentro del jboss en <o3>/jboss/modules/com/mysql
    Se adjunta el module.xml y el archivo ".index" para la versión "5.1.23" (debido a un error en la generación automática de este por el jboss).
    Aquí se demuestra como debe quedar la estructura de este módulo:

    1. "module.xml" en <o3>/jboss/modules/com/mysql/main con el siguiente contenido:

      Code Block
      <?xml version="1.0" encoding="UTF-8"?>
       
      <!--
       ~ JBoss, Home of Professional Open Source.
       ~ Copyright 2010, Red Hat, Inc., and individual contributors
       ~ as indicated by the @author tags. See the copyright.txt file in the
       ~ distribution for a full listing of individual contributors.
       ~
       ~ This is free software; you can redistribute it and/or modify it
       ~ under the terms of the GNU Lesser General Public License as
       ~ published by the Free Software Foundation; either version 2.1 of
       ~ the License, or (at your option) any later version.
       ~
       ~ This software is distributed in the hope that it will be useful,
       ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
       ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
       ~ Lesser General Public License for more details.
       ~
       ~ You should have received a copy of the GNU Lesser General Public
       ~ License along with this software; if not, write to the Free
       ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
       ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
       -->
       
      <module xmlns="urn:jboss:module:1.0" name="com.mysql">
       <resources>
       <resource-root path="mysql-connector-java-5.1.23-bin.jar"/>
       </resources>
       <dependencies>
       <module name="javax.api"/>
       </dependencies>
      </module>
    2. Agregar el driver de mysql (.jar) en <o3>/jboss/modules/com/mysql/main con el nombre igual al declarado en

      <resource-root path="mysql-connector-java-5.1.23-bin.jar"/>

    La estructura final tiene que quedar así:
    <o3>/jboss/modules/com/mysql/main
         - module.xml
         - mysql-connector-java-5.1.23-bin.jar
         - mysql-connector-java-5.1.23-bin.jar.index

  3. Editar el archivo <o3>/jboss/standalone/configuration/o3bi.xml, buscar la sección <drivers> y agregarle

    Code Block
    <driver name="mysql" module="com.mysql">
        <xa-datasource-class>
            com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
        </xa-datasource-class>
    </driver>
  4. Realizar el procedimiento de cambio de base de datos arriba enumerado

...