English 中文(简体)
Spring, Atomikos, Tibco system 5.1 Integration issue
原标题:Spring, Atomikos, Tibco EMS 5.1 integration issue

我正试图在我的春季申请中召集。 我正在使用:

  • Atomikos 3.7.1 (TransactionsEssentials)
  • Spring 3.0.2
  • Tibco EMS 5.1

有些人能否向我介绍使用JNDI为JMS使用的连接工厂的详细情况,以及Tibco MS配置的细节?

我尝试了如下:

 <bean id="jmsTemplate2" class="org.springframework.jms.core.JmsTemplate" >
    <property name="connectionFactory" ref="amqConnectionFactory" />
    <property name="defaultDestination" ref="queue" />
    <property name="sessionTransacted" value="true"/>
    <property name="messageConverter" ref="messageConverter"></property>
</bean>


<bean id="amqConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean"    init-method="init">
    <property name="uniqueResourceName" value="XAEMS" />
    <property name="xaConnectionFactory" ref="connectionFactory" />
    <property name="poolSize" value="10" />
</bean>

<jee:jndi-lookup id="connectionFactory" jndi-name="emsConnectionFactory">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tibjmsnaming://localhost:7222
    </jee:environment>
</jee:jndi-lookup> 

<jee:jndi-lookup id="queue" jndi-name="emsQueue">
    <jee:environment>
        java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
        java.naming.provider.url=tibjmsnaming://localhost:7222
    </jee:environment>
</jee:jndi-lookup>

但得出这一错误:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name  amqConnectionFactory  defined in file [C:springsourcevfabric-tc-server-developer-2.6.4.RELEASEspring-insight-instancewtpwebappsiRebal-Backend-Poc-Web-Integration-Final-xaWEB-INFclassesMETA-INFspringatchjobspriority-queue.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type  com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory  to required type  javax.jms.XAConnectionFactory  for property  xaConnectionFactory ; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory] to required type [javax.jms.XAConnectionFactory] for property  xaConnectionFactory : no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 39 more
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type  com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory  to required type  javax.jms.XAConnectionFactory  for property  xaConnectionFactory ; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory] to required type [javax.jms.XAConnectionFactory] for property  xaConnectionFactory : no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl
问题回答

这份答复太晚了,但为了张贴:

你们想要的那类人是 com。 工厂。

看来,在<条码>com.atomikos.jms.AtomikosConnectionFactoryBean上,你有一个名为<条码>xaConnectionFactory的田地,其类型(或原返回型)为<条码>javax.jms.XAConnectionFactory 。 然而,在春天配置档案中,你将这个领域与一个实例混为一谈:com.tibco.tibjms.naming.Tibjms Federal QueueConnectionFactory

显然,com.tibco.tibjms.naming.Tibjms Federal QueueConnectionFactory不可兑换成javax.jms.XAConnectionFactory





相关问题
Possible to sandbox Python configuration file?

I m thinking of implementing a configuration file written in Python syntax, not unlike what Django does. While I ve seen one or two SO questions about the merits of using executable code in ...

How to validate Java logging properties files?

I have a basic facility for allowing users to remotely apply changes to the logging files in my application. Some logs are configured using java.util.logging properties files, and some are configured ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

Dependency bundle (jar-files/sources/API docs) in Eclipse

I m developing various in-house extensions for JIRA, the issue tracker we use. So far I worked with Netbeans and everything worked like a charm. However, now I need to switch to Eclipse and I m ...

热门标签