然后在将spring-context.jar,spring-core.jar,spring-beans.jar添加到
activemq-ra.rar下。
四。启动jboss如果出现:
17:03:27,421 INFO [BrokerService] Using Persistence Adapter: JournalPersistenceAdapator(JDBCPersistenceAdaptor(org.apache.derby.jdbc.EmbeddedDataSource@5971c3))
17:03:27,421 INFO [BrokerService] ActiveMQ 5.1.0 JMS Message Broker (bruce.broker1) is starting
17:03:27,421 INFO [BrokerService] For help or more information please see: http://activemq.apache.org/
17:03:27,484 INFO [ManagementContext] JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi
17:03:28,421 INFO [JDBCPersistenceAdapter] Database driver recognized: [apache_derby_embedded_jdbc_driver]
17:03:29,296 INFO [DefaultDatabaseLocker] Attempting to acquire the exclusive lock to become the Master broker
17:03:29,312 INFO [DefaultDatabaseLocker] Becoming the master on dataSource: org.apache.derby.jdbc.EmbeddedDataSource@5971c3
17:03:29,343 INFO [JournalPersistenceAdapter] Journal Recovery Started from: Active Journal: using 5 x 20.0 Megs at: D:\jboss-4.2.3.GA\data\journal就代表你成功了。
如果在出现:
17:06:05,984 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@b36022: defining beans [org.apache.activemq.xbean.XBeanBrokerService]; root of factory hierarchy
17:06:06,125 INFO [BrokerService] Using Persistence Adapter: JournalPersistenceAdapator(JDBCPersistenceAdaptor(org.apache.derby.jdbc.EmbeddedDataSource@de6570))
17:06:06,140 INFO [BrokerService] ActiveMQ 5.1.0 JMS Message Broker (bruce.broker1) is starting
17:06:06,140 INFO [BrokerService] For help or more information please see: http://activemq.apache.org/
17:06:06,140 WARN [ManagementContext] Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
解决方法:
在broker-config.xml中添加:
<managementContext>
<managementContext createConnector="true" connectorPort="1199"/>
</managementContext>
然后启动jboss。