0 Replies Latest reply on Dec 5, 2013 6:51 PM by Mustaq Pradhan

    Resource adapter connection validation

    Mustaq Pradhan Newbie

      I have a resource-adapter defined as:

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">

                      <resource-adapters>

                          <resource-adapter id="b2e-ra-1">

                              <archive>

                                  dec-generic-jms-ra-1.0.0.rar

                              </archive>

                              <transaction-support>XATransaction</transaction-support>

                              <connection-definitions>

                                  <connection-definition class-name="org.jboss.resource.adapter.jms.JmsManagedConnectionFactory" jndi-name="java:jboss/ems/omsee4OutboundConnectionFactory" enabled="true" use-java-context="true" pool-name="omsee4OutboundConnectionFactory" use-ccm="true">

                                      <config-property name="JndiParameters">

                                          java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.provider.url=tcp://ud-esb-s1.apps.dev.det.nsw.edu.au:8722;java.naming.security.principal=username;java.naming.security.credentials=password

                                      </config-property>

                                      <config-property name="password">

                                          password

                                      </config-property>

                                      <config-property name="userName">

                                          username

                                      </config-property>

                                      <config-property name="ConnectionFactory">

                                          XAQueueConnectionFactory

                                      </config-property>

                                      <xa-pool>

                                          <min-pool-size>0</min-pool-size>

                                          <max-pool-size>10</max-pool-size>

                                          <prefill>false</prefill>

                                          <use-strict-min>false</use-strict-min>

                                          <flush-strategy>FailingConnectionOnly</flush-strategy>

                                      </xa-pool>

                                  </connection-definition>

                              </connection-definitions>

                          </resource-adapter>

                      </resource-adapters>

                  </subsystem>


      This configuration is reported to be working and connecting to the TIBCO queue.
      But when I try to test the connection, I get:

      [domain@localhost:9999 /] /host=j1003/server=b2e-103/subsystem=resource-adapters/resource-adapter=b2e-ra-1/connection-definitions=omsee4OutboundConnectionFactory:test-connection-in-pool()

      {

          "outcome" => "failed",

          "result" => undefined,

          "failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",

          "rolled-back" => true

      }

       

      And the strange observation is, I can't see any userName/password defined:

       

      [domain@localhost:9999 /] /host=j1003/server=b2e-103/subsystem=resource-adapters/resource-adapter=b2e-ra-1/connection-definitions=omsee4OutboundConnectionFactory:read-resource

      {

          "outcome" => "success",

          "result" => {

              "allocation-retry" => undefined,

              "allocation-retry-wait-millis" => undefined,

              "background-validation" => false,

              "background-validation-millis" => undefined,

              "blocking-timeout-wait-millis" => undefined,

              "class-name" => "org.jboss.resource.adapter.jms.JmsManagedConnectionFactory",

              "enabled" => true,

              "flush-strategy" => "FailingConnectionOnly",

              "idle-timeout-minutes" => undefined,

              "interleaving" => false,

              "jndi-name" => "java:jboss/ems/omsee4OutboundConnectionFactory",

              "max-pool-size" => 10,

              "min-pool-size" => 0,

              "no-recovery" => false,

              "no-tx-separate-pool" => false,

              "pad-xid" => false,

              "pool-prefill" => false,

              "pool-use-strict-min" => false,

              "recovery-password" => undefined,

              "recovery-plugin-class-name" => undefined,

              "recovery-plugin-properties" => undefined,

              "recovery-security-domain" => undefined,

              "recovery-username" => undefined,

              "same-rm-override" => undefined,

              "security-application" => false,

              "security-domain" => undefined,

              "security-domain-and-application" => undefined,

              "use-ccm" => true,

              "use-fast-fail" => false,

              "use-java-context" => true,

              "use-try-lock" => undefined,

              "wrap-xa-resource" => true,

              "xa-resource-timeout" => undefined,

              "config-properties" => {

                  "JndiParameters" => undefined,

                  "password" => undefined,

                  "userName" => undefined,

                  "ConnectionFactory" => undefined

              }

          }

      }


      Any help, please?