|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Integration JMS BITRONIX in tomcatHi,
I try to use BTM as transaction manager with jms datasource in tomcat like this configuration with sql datasource http://docs.codehaus.org/display/BTM/Tomcat13 I read this JMS configuration : http://docs.codehaus.org/display/BTM/JmsConfiguration which help me but I have an error: Failed to convert property value of type [bitronix.tm.resource.jms.PoolingConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [bitronix.tm.resource.jms.PoolingConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found My configuration : resources.properties resource.cf.className=org.apache.activemq.ActiveMQXAConnectionFactory resource.cf.uniqueName=jms/AConnectionFactory resource.cf.maxPoolSize=5 resource.cf.allowLocalTransactions=true resource.cf.driverProperties.brokerURL=tcp://localhost:61616 context.xml <?xml version="1.0" encoding="UTF-8" ?> <Context> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" /> <Resource name="jms/AConnectionFactory" auth="Container" type="javax.jms.ConnectionFactory" factory="bitronix.tm.resource.ResourceObjectFactory" uniqueName="jms/AConnectionFactory" /> </Context> web.xml ... <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext*.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <resource-ref> <res-ref-name>jms/AConnectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> ... applicationContext-services.xml ... <jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/comp/env/jms/AConnectionFactory" resource-ref="true" /> <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"> <constructor-arg index="0"> <value>Myqueue</value> </constructor-arg> </bean> <bean id="myAsynchJmsListener" class="classes.MyAsynchJmsListener"/> <bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="concurrentConsumers" value="1"/> <property name="connectionFactory" ref="jmsConnectionFactory" /> <property name="destination" ref="destination" /> <property name="messageListener" ref="myAsynchJmsListener" /> <property name="sessionTransacted" value="true"/> </bean> ... Could you help me please ? |
|
|
Re: Integration JMS BITRONIX in tomcatLooks like a classloader issue to me. Make sure jms.jar (or whatever JAR file which contains javax.jms.*) is in Tomcat's folder next to the btm JAR file (BTM ships with geronimo-jms_1.1_spec.jar which is the Geronimo JAR containing the JMS spec classes, better use that one) and that it's not in the WEB-INF/lib folder of your web archive.
|
|
|
Re: Integration JMS BITRONIX in tomcatHi,
Your reply help me a lot I delete all .jar using javax.jms.* and put geronimo-jms_1.1_spec.jar instead of and it work fine. ![]() However I have an other question about the same subject. Indeed, i define my queue in my application so can you explain me how I can define my destination queue like my connection factory please? |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |