我们正在尝试从 Spring 1.2.8 升级到 Spring 3.0 但是,当我们尝试为 Websphere 配置 txManager 时,我总是遇到类转换异常。我们根据IBM提供的示例进行了尝试,但不起作用。我正在使用 WAS 7.0、Spring.3.0.5 和 hibernate.3.6.jars...这是 Spring 配置:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="ewpDataSource" />
<property name="mappingResources">
<list>
<value>com/fme/example/model/Person.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.default_schema">ORIG</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
<prop key="hibernate.use_sql_comments">true</prop>
<prop key="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</prop>
<prop key="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
</prop>
</props>
</property>
</bean>
<!-- Our Data source --->
<bean id="ewpDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/TOI_ORIG" />
</bean>
<!--- Get the Web sphere Specific TX manager -->
<bean id="transactionManager" …Run Code Online (Sandbox Code Playgroud)