activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Więcław (JIRA) <j...@apache.org>
Subject [jira] [Created] (AMQ-4477) ActiveMQ as WebSphere JMS Provider does not reconnect after AMQ server restart
Date Fri, 19 Apr 2013 09:59:15 GMT
Andrzej Więcław created AMQ-4477:
------------------------------------

             Summary: ActiveMQ as WebSphere JMS Provider does not reconnect after AMQ server
restart
                 Key: AMQ-4477
                 URL: https://issues.apache.org/jira/browse/AMQ-4477
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 5.7.0, 5.6.0
         Environment: Windows Server 2008 R2
            Reporter: Andrzej Więcław


I have ActiveMQ defined as WebSphere 7 JMS Provider (see configuration script below).
I expose ActiveMQ queues to my MDBs through Message Listener Port (MLP).

MDB immediately consume arriving messages until something happens to the AMQ server connection
(e.g. AMQ server is restarted due to maintenance activities).
According to WebSphere policy MLP attempts to reestablish connection 5 times, every one minute.
In most of the cases AMQ server is back again running within 5 min and WebSphere does not
report any problem - status of MLP is "running".
Unfortunately MBD does not consume any arriving messages until MLP is manually restarted.

After restart everything starts to work as it should.


ActiveMQ JMS Provider configuration script (JACL):
{code}
import sys

jmsProviderUrl = "tcp://x.x.x.x:61616"    
# Retrieve cell name
cell = AdminControl.getCell()
scope = "Cell=" + cell
jmsProviderName = "ActiveMQ"
node = sys.argv[0]
server = sys.argv[1]

# ----------------
# Add JMS Provider
# ----------------
attributes = [["description", "ActiveMQ JMS Provider"], \
              ["propertySet", [["resourceProperties", [ \
                                                       [["name", "java.naming.connectionFactoryNames"],
["type", "java.lang.String"], ["value", "ConnectionFactory,XAConnectionFactory"]], \
                                                       [["name", "java.naming.queue.MXITEMIN"],
["type", "java.lang.String"], ["value", "MX.ITEM.IN"]] \
                                                       ] \
                                ]] \
               ]]
AdminJMS.createJMSProviderAtScope(scope, jmsProviderName, \
                                  "org.apache.activemq.jndi.ActiveMQWASInitialContextFactory",
\
                                  jmsProviderUrl, attributes)

# ----------------------
# Add Connection Factory
# ----------------------
attributes = [["description", "ActiveMQ Queue Connection Factory"], \
              ["type", "UNIFIED"], \
              ["connectionPool", [ \
                                  ["connectionTimeout", "1800"], \
                                  ["maxConnections", "6"], \
                                  ["minConnections", "0"], \
                                  ["reapTime", "180"], \
                                  ["unusedTimeout", "1800"], \
                                  ["agedTimeout", "1800"], \
                                  ["purgePolicy", "EntirePool"] \
                                  ] \
               ], \
              ["sessionPool", [ \
                                  ["connectionTimeout", "1800"], \
                                  ["maxConnections", "1"], \
                                  ["minConnections", "0"], \
                                  ["reapTime", "10"], \
                                  ["unusedTimeout", "1800"], \
                                  ["agedTimeout", "1800"], \
                                  ["purgePolicy", "EntirePool"] \
                                  ] \
            ]]
AdminJMS.createGenericJMSConnectionFactoryAtScope(scope, jmsProviderName, "ACTIVEMQCF", \
                                                  "if/maximo/activemq/cf", "XAConnectionFactory",
\
                                                  attributes)

# ----------------------
# Add Queues
# ----------------------
# 1. MX.ASSET.IN
attributes = [["description", "ActiveMQ ASSET Queue"], ["type", "QUEUE"]]
AdminJMS.createGenericJMSDestinationAtScope(scope, jmsProviderName, "MAXIMO04IN", \
                                            "if/maximo/activemq/q04cin", "MXASSETIN", \
                                            attributes) 


# ---------------------------------------
# Create IF-server Message Listener Ports 
# ---------------------------------------
# PORTMAXIMO01IN
attributes = [["description", "ActiveMQ Item"]]
AdminServerManagement.configureListenerPortForMessageListenerService(node, server, "PORTMAXIMO01IN",
\
                                                                     "if/maximo/activemq/cf",
\
                                                                     "if/maximo/activemq/q01cin",
\
                                                                     1, 5, 1, attributes)
{code}

------------------
Expected behavior:
------------------
AMQ client should properly reestablish connection to AMQ server and pass through incoming
messages or at least report back that connection is not working properly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message