markash
Aug 19th, 2004, 08:47 AM
Good Day,
javascript:emoticon(':?')
Confused
I am trying to get the Connection from a DataSoure that is managed by WebSphere 5.1 Application Server. I was able to lookup the DataSource using JNDI but when I try to use the WebSphereTransactionManagerFactoryBean to get the TransactionManager I get a classcast error from the BeansWrapper.
It looks like the WebSphereTransactionManagerFactoryBean is not the correct type of object to reference in bean customer
but I cannot find a way to call the getObject method that returns the TransactionManager in the customer bean.
javascript:emoticon(':wink:')
Wink
Basically, if somebody could show how to use this class in the applicationContext.xml to get a WebSphere Transaction Manager that would be great.
<!-- WebSphere Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
<!--
<bean id="transactionManager" class="org.springframework.transaction.jta.WebSphereTrans actionManagerFactoryBean" />
-->
<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
<!-- Transactional proxy for the Petclinic primary business object -->
<bean id="customer" class="org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="target"><ref local="customerTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="store*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
:?
javascript:emoticon(':?')
Confused
I am trying to get the Connection from a DataSoure that is managed by WebSphere 5.1 Application Server. I was able to lookup the DataSource using JNDI but when I try to use the WebSphereTransactionManagerFactoryBean to get the TransactionManager I get a classcast error from the BeansWrapper.
It looks like the WebSphereTransactionManagerFactoryBean is not the correct type of object to reference in bean customer
but I cannot find a way to call the getObject method that returns the TransactionManager in the customer bean.
javascript:emoticon(':wink:')
Wink
Basically, if somebody could show how to use this class in the applicationContext.xml to get a WebSphere Transaction Manager that would be great.
<!-- WebSphere Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
<!--
<bean id="transactionManager" class="org.springframework.transaction.jta.WebSphereTrans actionManagerFactoryBean" />
-->
<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
<!-- Transactional proxy for the Petclinic primary business object -->
<bean id="customer" class="org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="target"><ref local="customerTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="store*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
:?