繁体   English   中英

将db2 xa数据源添加到JBoss 7

[英]Adding db2 xa datasource to JBoss 7

我试图在JBoss上添加db2 xa数据源。
JBoss 7.1,
Java 11。

这是我的standalone-full-ha.xml

   <subsystem xmlns="urn:jboss:domain:datasources:5.0">
        <datasources>
            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>
            <drivers>
                <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
                <driver name="db2jcc" module="com.ibm">
                    <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
                    <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
                </driver>

            </drivers>
        </datasources>
    </subsystem>

目录结构是standalone-modules-com-ibm-main ,我在其中添加了jar文件(db2jcc.jar,db2jcc_license_cu.jar,db2jcc_license_cisuz.jar)和module.xml。
我的module.xml是,

<?xml version="1.0" encoding="UTF-8"?>
<module name="com.ibm" xmlns="urn:jboss:module:1.1">
    <resources>
        <resource-root path="db2jcc.jar"/>
        <resource-root path="db2jcc_license_cu.jar"/>
        <resource-root path="db2jcc_license_cisuz.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>



我试过了,
.\\standalone.bat --server-config=standalone-full-ha.xml ,但它完全没有改变。 它不会在控制台的“ Detected选项卡上显示它。
日志文件显示,

  1  INFO  [org.jboss.as.server] (Thread-1) WFLYSRV0220: Server shutdown has been requested via an OS signal
  2   [org.jboss.modcluster] (ServerService Thread Pool -- 35) MODCLUSTER000002: Initiating mod_cluster shutdown
  3  INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0010: Unbound data source [java:jboss/datasources/Ex    ampleDS]
  4  INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0008: Undertow HTTPS listener https suspending
  5 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 127.0.0.1:    8443
  6  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000080: Disconnecting JGroups channel ejb
  7  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000082: Stopping the RpcDispatcher for cha    nnel ejb
  8  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-8) ISPN000080: Disconnecting JGroups channel ejb
  9  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000080: Disconnecting JGroups channel ejb
 10  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-8) ISPN000082: Stopping the RpcDispatcher for cha    nnel ejb
 11  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000082: Stopping the RpcDispatcher for cha    nnel ejb
 12  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000080: Disconnecting JGroups channel ejb
 13  INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000082: Stopping the RpcDispatcher for cha    nnel ejb
 14  INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0019: Host default-host stopping
 15  INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0004: Undertow 1.4.18.Final-redhat-2 stopping
 16  INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0019: Stopped Driver service with driver-name = h2
 17  INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment xxxxx.war (runtime-name: xxxxx.war) in 836ms
 18  INFO  [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: JBoss EAP 7.1.0.GA (WildFly Core 3.0.10.Final-redhat-1) stopped in 844ms
 19  INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final-redhat-1
 20  FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1
 21  INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final-redhat-1
 22 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1

谁能指出我做错了什么?

首先,请检查以下官方文档: https ://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/configuration_guide/datasource_management#example_ibm_db2_xa_datasource其次,Java 11已通过测试并仅受EAP支持7.2! Java 1.8支持EAP 7.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM