Thank Bruce for reply!
Previously if I disabled Geronimo's ActiveMQ,JMS client will not connect
61616 port as if ServiceMix's JMS connect factory don't start at all within
Geronimo.
Lately I follow Guillaume's insturction by embedding a
broker(tcp://localhost:61626) in servicemix.xml.Here I don't disable
Geronimo's ActiveMQ,just start a broker on port 61626 in ServiceMix so thar
it will not use Geronimo's ActiveMQ.
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"
singleton="true">
<property name="config" value="classpath:broker.xml"/>
</bean>
<sm:serviceunit id="jbi" depends-on="broker">
<sm:activationSpecs>
...
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="tcp://localhost:61626" />
</bean>
</property>
</bean>
Someone argue that more things can integrated into Geronimo so that I
have some interest in running ServiceMix on Geronimo, and this problem can't
be solved from then on.In the future I will mostly run ServiceMix
standalone.
If I add a broker in ServiceMixGBean's doStart() Method,no error/stack
trace was thrown.I found no listening in port 61626.
// code
public class ServiceMixGBean implements GBeanLifecycle, ServiceMixContainer
{
...
public void doStart() throws Exception {
...
try{
if(broker == null){
broker = new BrokerService();
broker.addConnector("tcp://localhost:61626");
broker.start();
}
}catch(Exception e){
log.error("Cannot start broker", e);
}
try {
if (container == null) {
container = createContainer();
container.init();
container.start();
// Create a JMX Connector
JMXServiceURL url = new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" + namingPort
+ "/jmxrmi");
// Create and start the RMIConnectorServer
MBeanServer server = container.getMBeanServer();
connectorServer =
JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);
connectorServer.start();
//
connectionFactory = new
ActiveMQConnectionFactor("tcp://localhost:61626");
}
} finally {
Thread.currentThread().setContextClassLoader(old);
}
}
Do you give me some suggestion on this method?
SP Liu
--
View this message in context:
http://www.nabble.com/How-to-run-multi-jms-assembly-deployed-in-ServiceMix-within-Geronimo-t1601059.html#a4352797
Sent from the ServiceMix - User forum at Nabble.com.