geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaaaa <aa...@mytrashmail.com>
Subject Re: how to deploy application scope activemq broker?
Date Tue, 07 Oct 2008 19:50:47 GMT

I have working spring web app which is using default jms broker,
DefaultActiveMQConnectionFactory, SendReceiveQueue ...

 in addition to the default broker I've created second one defined like:
...
  <dep:gbean
class="org.apache.geronimo.activemq.management.ActiveMQManagerGBean"
name="ActiveMQManager2"/>
    <dep:gbean class="org.apache.geronimo.activemq.BrokerServiceGBeanImpl"
name="ActiveMQ2">

    <dep:attribute name="brokerName">testdb1-broker</dep:attribute>
    <dep:attribute name="useShutdownHook">false</dep:attribute>
    <dep:attribute name="dataDirectory">var/activemq2</dep:attribute>
    <dep:reference name="dataSource">
      <dep:name>testdb1-postgre</dep:name>
    </dep:reference>
    <dep:reference name="manager">
      <dep:name>ActiveMQManager2</dep:name>
    </dep:reference>
    <dep:reference name="serverInfo">
      <dep:name>ServerInfo</dep:name>
    </dep:reference>
    <dep:reference name="mbeanServerReference">
      <dep:name>MBeanServerReference</dep:name>
    </dep:reference>
    </dep:gbean>
    
    <dep:gbean
class="org.apache.geronimo.activemq.TransportConnectorGBeanImpl"
name="ActiveMQ2.tcp.default">
        <dep:attribute name="protocol">tcp</dep:attribute>
        <dep:attribute name="host">localhost</dep:attribute>
        <dep:attribute name="port">62626</dep:attribute>
        
        <dep:reference name="brokerService">
            <dep:name>ActiveMQ2</dep:name>
        </dep:reference>
    </dep:gbean>
...

plan.xml:
...
        <resourceadapter-instance>
            <resourceadapter-name>ActiveMQ2 RA</resourceadapter-name>
      <config-property-setting
name="ServerUrl">tcp://localhost:62626</config-property-setting>
            <nam:workmanager
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
                <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
            </nam:workmanager>
        </resourceadapter-instance>
...

ActiveMQ2 starts - I can see default and new broker, connection,queue in
console. port 62626 is open.
Now I'm trying to use new conn and queue in my app,but I get this err:

23:15:06,101 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for
org.apache.geronimo.connector.outbound.ConnectionInfo@1fd8d45
javax.resource.ResourceException: Could not create connection.
	at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:112)
	at
org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)
	at
org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)
	at
org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)
	at
org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
	at
org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:46)
	at
org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:94)
	at
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
	at
org.apache.geronimo.connector.outbound.AbstractConnectionManager.doRecovery(AbstractConnectionManager.java:65)
	at
org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper.doStart(ManagedConnectionFactoryWrapper.java:166)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
	at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
	at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
	at
org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
	at
org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
	at
org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
	at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176)
	at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
	at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:254)
	at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:294)
	at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
	at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
	at
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:562)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:543)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
	at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
	at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
	at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
	at
javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
	at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
	at java.security.AccessController.doPrivileged(Native Method)
	at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
	at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
	at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
	at sun.rmi.transport.Transport$1.run(Transport.java:153)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:62626. Reason: java.net.ConnectException: Connection refused
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:280)
	at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:168)
	at
org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:108)
	at
org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:102)
	at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:109)
	... 66 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:520)
	at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:335)
	at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:303)
	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:49)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
	at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:66)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
	... 70 more
23:15:06,105 ERROR [RecoveryController] javax.transaction.SystemException:
Could not obtain recovery XAResource for managedConnectionFactory
org.apache.activemq.ra.ActiveMQManagedConnectionFactory@64ac200b



can anybody give me a hint what I'm doing wrong? I would like to have  both
brokers running...
thanks.




-- 
View this message in context: http://www.nabble.com/how-to-deploy-application-scope-activemq-broker--tp19842755s134p19865899.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message