Announcement Announcement Module
Collapse
No announcement yet.
ActiveMQ JMX in Springsource DM Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActiveMQ JMX in Springsource DM Server

    Hello, I'm new here and that's why I'm not sure if this is the correct place to ask my question. Please be kind
    My problem is, that I'm trying to start Apache ActiveMQ (5.2.0) as an embedded broker in my Springsource DM Server (1.0.2) instance. The broker starts correctly except for JMX connector that keeps shouting:

    JMX connector org.apache.activemq.broker.jmx.ManagementContext.u nknown W Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.springsource.server.osgi.framework.equinox.Ser verBundleClassLoader]

    I run broker from bean:

    <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="vm://ulmsBroker"/>
    </bean>

    ..and there is simply no place for me to do something wrong about JMX. I've tried to deploy it also in totally clean DM server (with needed bundles com.springsource.javax.jms-1.1.0.jar, com.springsource.javax.management.j2ee-1.0.1.jar and com.springsource.org.apache.activemq-5.2.0.jar added into the repository/bundles/usr directory of course) and the result was the same. Is this some sort of bug, or do I do somtehing wrong?
    If you need some additional information from me, I'll provide them with pleasure.

  • #2
    Update

    The same exception appears even when using XBEAN to configure the broker:

    <beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:amq="http://activemq.apache.org/schema/core"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
    http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

    <!-- lets create an embedded ActiveMQ Broker -->
    <amq:broker useJmx="true" persistent="true">
    <amq:transportConnectors>
    <amq:transportConnector uri="tcp://localhost:61616" />
    </amq:transportConnectors>
    </amq:broker>

    <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
    <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>


    <!-- Spring JMS Template -->
    <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory">
    <!-- lets wrap in a pool to avoid creating a connection per send -->
    <bean class="org.springframework.jms.connection.SingleCo nnectionFactory">
    <property name="targetConnectionFactory">
    <ref local="jmsFactory" />
    </property>
    </bean>
    </property>
    </bean>

    <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="jmsFactory"/>
    </bean>

    </beans>

    I've got stronger and stronger feeling, that this is really a bug somewhere between DM server and ActiveMQ bundle.
    As I've mentioned above, I'm new here, could someone advise me who to address with this problem?

    Comment


    • #3
      And one more update, this excetion is thrown even when I try to create new BrokerService instance programmatically:

      private void newBroker() throws Exception {
      BrokerService bs = new BrokerService();
      bs.setBrokerName("broker2");
      bs.setUseJmx(true);
      bs.start();
      Thread.sleep(5000);
      bs.stop();
      }

      Comment

      Working...
      X