1) Move the properties from the persistence.xml to your applicationContext
2) Remove the SessionFactory and HibernateTransactionManager (orif you need hibernate configure it to use JTA also)
3) Make up your mind on what you want to use Annotations or xml for transactions
4) Configure a JTATransactionManager
Note: I'm going to assume that you are using Spring 2.5.x here.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
<jee:jndi-lookup id="dataSource" jndi-name="java:IrissDS" />
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.connection.isolation=2
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.current_session_context_class=jta
hibernate.jdbc.batch_size=5
hibernate.transaction.flush_before_completion=true
</value>
</property>
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<tx:annotation-driven transaction-manager="transactionManager" />
<tx:jta-transaction-manager />
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="database" value="MYSQL"/>
</bean>
</property>
<property name="jpaProperties">
<value>
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.current_session_context_class=jta
</value>
</property>
</bean>
</beans>
persistence.xml
Code:
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ">
<persistence-unit name="bspEntityMgr" transaction-type="JTA" >
<mapping-file>META-INF/orm.xml</mapping-file>
<class>com.bsp.entity.AccountMaster</class>
<class>com.bsp.entity.AccountSession</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
</persistence-unit>
</persistence>
Note: can be that you still need to include a jta-datasource here, haven't actually tested it.
Note2: Why do you have an ORM and Classes configured?! Normally you use either a orm.xml OR classes not both.