I have defined my JMS resources within the resource plan. I define a resource
adapter somewhat similar to this.
However the point of importance here is that I define my Active MQ to be
hosted on a different server location as follows:
<config-property-setting name="ServerUrl">
tcp://server2:61616
</config-property-setting>
the problem that I am facing is that everytime, I restart the server2, I
need to correspondingly restart my server on localhost. Can this be avoided
somehow ?
I get a javax.jms.JMSException: syncSendTimedOut: connection no longer OK
if I don't restart my server
---------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
<environment
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
<moduleId>
<groupId>console.jms</groupId>
<artifactId>SampleResourceGroup</artifactId>
<version>1.0</version>
<type>rar</type>
</moduleId>
<dependencies>
<dependency>
<groupId>geronimo</groupId>
<artifactId>activemq-broker</artifactId>
<type>car</type>
</dependency>
</dependencies>
</environment>
<resourceadapter>
<!-- how to connect to the JMS Server -->
<resourceadapter-instance>
<resourceadapter-name>
My JMS Resources
</resourceadapter-name>
<config-property-setting name="ServerUrl">
tcp://server2:61616
</config-property-setting>
<config-property-setting name="UserName">
geronimo
</config-property-setting>
<config-property-setting name="Password">
geronimo
</config-property-setting>
<workmanager>
<gbean-link>DefaultWorkManager</gbean-link>
</workmanager>
</resourceadapter-instance>
<!-- defines a ConnectionFactory -->
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>
javax.jms.ConnectionFactory
</connectionfactory-interface>
<connectiondefinition-instance>
<name>MyConnectionFactory</name>
<implemented-interface>
javax.jms.QueueConnectionFactory
</implemented-interface>
<implemented-interface>
javax.jms.TopicConnectionFactory
</implemented-interface>
<connectionmanager>
<xa-transaction>
<transaction-caching />
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>
5000
</blocking-timeout-milliseconds>
<idle-timeout-minutes>
0
</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<!-- defines a Topic -->
<adminobject>
<adminobject-interface>
javax.jms.Topic
</adminobject-interface>
<adminobject-class>
org.activemq.message.ActiveMQTopic
</adminobject-class>
<adminobject-instance>
<message-destination-name>
MyTopic
</message-destination-name>
<config-property-setting name="PhysicalName">
MyTopic
</config-property-setting>
</adminobject-instance>
</adminobject>
<!-- defines a Queue -->
<adminobject>
<adminobject-interface>
javax.jms.Queue
</adminobject-interface>
<adminobject-class>
org.activemq.message.ActiveMQQueue
</adminobject-class>
<adminobject-instance>
<message-destination-name>
MyQueue
</message-destination-name>
<config-property-setting name="PhysicalName">
MyQueue
</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
--
View this message in context:
http://www.nabble.com/ActiveMQ-connection-problems-tf2778169.html#a7751143
Sent from the ActiveMQ - User mailing list archive at Nabble.com.