Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2001

rar returns connection success when no service available

XMLWordPrintable

    • Hide

      Define resource adapter [1].
      Connect via jboss-cli [2].
      Errors logged in console [3], but successful connection returned [2].
      [4] appropriate failure if tcp vs failover protocol is used.

      [1]

      	<subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
      		<resource-adapters> 
      		<resource-adapter id="activemq-rar.rar"> 
      			<archive>activemq-rar-5.11.0.redhat-630187.rar</archive> 
      			<transaction-support>XATransaction</transaction-support> 
      			<config-property name="ServerUrl"> 
      				failover:ssl://amq03:99999 <!-- tcp:://127.0.0.1:54208 --></config-property> 
      			<config-property name="UserName"> undefined </config-property> 
      			<config-property name="Password"> undefined </config-property> 
      			<connection-definitions> 
      				<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/ConnectionFactory" enabled="true" use-java-context="true" pool-name="ActiveMQConnectionFactoryPool" use-ccm="false"> 
      					<xa-pool> 
      						<min-pool-size>20</min-pool-size> 
      						<max-pool-size>40</max-pool-size> 
      						<is-same-rm-override>false</is-same-rm-override> 
      					</xa-pool> 
      				</connection-definition> 
      			</connection-definitions> 
      			<admin-objects> 
      				<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/queue/INBOUND_QUEUE_DLQ" enabled="true" use-java-context="true" pool-name="ActiveMQQueue.queue_in_DLQ"> 
      					<config-property name="PhysicalName"> INBOUND_QUEUE.DLQ </config-property> 
      				</admin-object> 
      				<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/queue/OUTBOUND_QUEUE" enabled="true" use-java-context="true" pool-name="ActiveMQQueue.queue_out"> 
      					<config-property name="PhysicalName"> OUTBOUND_QUEUE </config-property> 
      				</admin-object> 
      			</admin-objects> 
      		</resource-adapter> 
      		</resource-adapters>
              </subsystem>
      

      [2]

      [disconnected /] connect
      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ActiveMQConnectionFactoryPool:test-connection-in-pool
      {
          "outcome" => "success",
          "result" => [true]
      }
      

      [3]

      14:22:34,753 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started in 3929ms - Started 171 of 227 services (55 services are passive or on-demand)
      14:23:33,712 WARN  [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Failed to connect to [ssl://amq03:99999] after: 10 attempt(s) continuing to retry.
      14:27:42,150 WARN  [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Failed to connect to [ssl://amq03:99999] after: 20 attempt(s) continuing to retry.
      ...
      

      [4]

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ActiveMQConnectionFactoryPool:test-connection-in-pool
      {
          "outcome" => "failed",
          "failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
          "rolled-back" => true
      }
      
      Show
      Define resource adapter [1] . Connect via jboss-cli [2] . Errors logged in console [3] , but successful connection returned [2] . [4] appropriate failure if tcp vs failover protocol is used. [1] <subsystem xmlns= "urn:jboss:domain:resource-adapters:1.1" > <resource-adapters> <resource-adapter id= "activemq-rar.rar" > <archive>activemq-rar-5.11.0.redhat-630187.rar</archive> <transaction-support>XATransaction</transaction-support> <config-property name= "ServerUrl" > failover:ssl: //amq03:99999 <!-- tcp:://127.0.0.1:54208 --></config-property> <config-property name= "UserName" > undefined </config-property> <config-property name= "Password" > undefined </config-property> <connection-definitions> <connection-definition class- name= "org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name= "java:/ConnectionFactory" enabled= " true " use-java-context= " true " pool-name= "ActiveMQConnectionFactoryPool" use-ccm= " false " > <xa-pool> <min-pool-size>20</min-pool-size> <max-pool-size>40</max-pool-size> <is-same-rm-override> false </is-same-rm-override> </xa-pool> </connection-definition> </connection-definitions> <admin-objects> <admin-object class- name= "org.apache.activemq.command.ActiveMQQueue" jndi-name= "java:/queue/INBOUND_QUEUE_DLQ" enabled= " true " use-java-context= " true " pool-name= "ActiveMQQueue.queue_in_DLQ" > <config-property name= "PhysicalName" > INBOUND_QUEUE.DLQ </config-property> </admin-object> <admin-object class- name= "org.apache.activemq.command.ActiveMQQueue" jndi-name= "java:/queue/OUTBOUND_QUEUE" enabled= " true " use-java-context= " true " pool-name= "ActiveMQQueue.queue_out" > <config-property name= "PhysicalName" > OUTBOUND_QUEUE </config-property> </admin-object> </admin-objects> </resource-adapter> </resource-adapters> </subsystem> [2] [disconnected /] connect [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ActiveMQConnectionFactoryPool:test-connection-in-pool { "outcome" => "success" , "result" => [ true ] } [3] 14:22:34,753 INFO [org.jboss.as] (Controller Boot Thread ) JBAS015874: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started in 3929ms - Started 171 of 227 services (55 services are passive or on-demand) 14:23:33,712 WARN [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Failed to connect to [ssl: //amq03:99999] after: 10 attempt(s) continuing to retry. 14:27:42,150 WARN [org.apache.activemq.transport.failover.FailoverTransport] (ActiveMQ Task-1) Failed to connect to [ssl: //amq03:99999] after: 20 attempt(s) continuing to retry. ... [4] [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ActiveMQConnectionFactoryPool:test-connection-in-pool { "outcome" => "failed" , "failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid" , "rolled-back" => true }

      ActiveMQManagedConnectionFactory#createManagedCOnnection returns a valid ActiveMQManagedConnection when no connection is available.

              Unassigned Unassigned
              rhn-support-jolee Johnathon Lee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: