Atomikos Forum

Weblogic JMS

We are using weblogic-jms server.
 How should i configure my spring context in order to work with atomikos and weblogic jms, XA transactions.

My current configurations is below.

<bean id="atomikosTransactionManager"
    class="com.atomikos.icatch.jta.UserTransactionManager"
    init-method="init" destroy-method="close">
    <property name="forceShutdown" value="true" />
</bean>

<bean id="atomikosUserTransaction"     
  class="com.atomikos.icatch.jta.UserTransactionImp">
  <property name="transactionTimeout" value="300" />
</bean>

<bean id="transactionManager"
        class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="transactionManager" ref="atomikosTransactionManager" />
        <property name="userTransaction" ref="atomikosUserTransaction" />
</bean>

<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">t3://10.1.1.2:7003</prop>
                <prop key="java.naming.security.principal">weblogic</prop>
                <prop key="java.naming.security.credentials">weblogic</prop>
            </props>
        </property>
</bean>

    <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate">
            <ref bean="jndiTemplate" />
        </property>
        <property name="jndiName">
            <value>jms/testConnectionFactory</value>
        </property>
    </bean>

    <bean id="jmsDestinationResolver"
        class="org.springframework.jms.support.destination.JndiDestinationResolver">
        <property name="jndiTemplate">
            <ref bean="jndiTemplate" />
        </property>
        <property name="cache">
            <value>true</value>
        </property>
    </bean>

    <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory">
            <ref bean="queueConnectionFactory" />
        </property>
        <property name="destinationResolver">
            <ref bean="jmsDestinationResolver" />
        </property>
    </bean>

    <bean id="testQueue" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiTemplate">
            <ref bean="jndiTemplate" />
        </property>
        <property name="jndiName">
            <value>jms/testQueue</value>
        </property>
    </bean>
hakans Send private email
Monday, June 18, 2012
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics