Hi KOS, Do you solve this problem? I want to implement this case, but I don't know how to implement it? Is there any one can help me?
Thanks. colin.chi KOS wrote: > > Hi > > I'm trying to run servicemix on a Linux machine where activemq is already > running. For that, I changed /conf/activemq.xml to this: > > <beans xmlns:amq="http://activemq.org/config/1.0"> > <!-- ActiveMQ JMS Broker configuration --> > <amq:broker id="broker" useShutdownHook="false" useJmx="false"/> > <!-- > JMS ConnectionFactory to use. Change the brokerURL attribute to point to > the remote AMQ broker > --> > <amq:connectionFactory id="connectionFactory" > brokerURL="tcp://localhost:61616"/> > </beans> > > This should use the activemq already running at port 61616. > > After that, there's still a port conflict for rmiRegistry (Port 1099). I > change the rmi.port in servicemix.properties to e.g. 3099, which solves > the problem at the first glance. > > When trying to start servicemix with this configuration, I get the > following error: > > Caught: org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'jndi' defined in class path resource [jndi.xml]: > Cannot resolve reference to bean 'jndiEntries' while setting bean property > 'entries'; > > My jndi.xml looks as follows (didn't change anything there): > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > <!-- START SNIPPET: jndi --> > <beans xmlns:jencks="http://jencks.org/2.0" > xmlns:amq="http://activemq.org/config/1.0" > xmlns:amqra="http://activemq.apache.org/schema/ra" > xmlns:util="http://www.springframework.org/schema/util"> > > <bean id="jndi" depends-on="broker" > class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" > factory-method="makeInitialContext" > singleton="true"> > <property name="entries" ref="jndiEntries" /> > </bean> > > <util:map id="jndiEntries"> > > <!-- wsn2005 jms connection factory --> > <entry key="java:comp/env/jms/wsnotificationCF"> > <bean class="org.apache.activemq.pool.PooledConnectionFactory" > destroy-method="stop"> > <constructor-arg value="${activemq.url}" /> > </bean> > </entry> > > <!-- transaction manager --> > <entry key="javax.transaction.TransactionManager" > value-ref="transactionManager" /> > <entry key="java:comp/env/smx/TransactionManager" > value-ref="transactionManager" /> > > <!-- bootstrap context --> > <entry key="java:comp/env/smx/BootstrapContext" > value-ref="bootstrapContext" /> > > <!-- connection context --> > <entry key="java:comp/env/smx/ConnectionManager" > value-ref="connectionManager" /> > > <!-- Authentication service --> > <entry key="java:comp/env/smx/AuthenticationService" > value-ref="authenticationService" /> > > <!-- Keystore manager --> > <entry key="java:comp/env/smx/KeystoreManager" > value-ref="keystoreManager" /> > </util:map> > > <!-- A managed JMS ConnectionFactory for ActiveMQ --> > <amqra:managedConnectionFactory > id="activemqMCF" > resourceAdapter="#activemqRA" /> > <amqra:resourceAdapter > id="activemqRA" > serverUrl="vm://localhost"/> > <jencks:connectionFactory > id="activemqCF" > managedConnectionFactory="#activemqMCF" > connectionManager="#connectionManager" /> > > </beans> > <!-- END SNIPPET: jndi --> > > > I don't know if I'm correctly using the already existing activeMQ and what > the dependencies are to JNDI. I get the same error when I, instead of > trying to use the existing acitveMQ, change the activemq.port to e.g > 61619, and leave activemq.xml as it was originally. > > Servicemix Version: 3.3 > ActiveMQ Version: 4.1.1 > > Thanks for help > Silvio > -- View this message in context: http://www.nabble.com/Running-Servicemix-using-already-existing-ActiveMQ--%27jndiEntries%27-reference-tp21106532p25250431.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
