hi
I am new to hibernate. I have a project which successfully runs in jboss. I want to make it to run in tomcat 6. I have found tomcat need to be configured with jotm. I have configured it and run the test sample provided in jtom site. but my project has default configuration for jboss. could you kindly help me where i have to make changes to make it run in tomcat 6. I have attached my persistence.xml and application-context persistence.xml file.
Persistence.xml
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<persistence 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/ ... ce_1_0.xsd"
version="1.0">
<persistence-unit name="IndigoPU" transaction-type="JTA">
<jta-data-source>java:comp/env/jdbc/IndigoDS</jta-data-source>
<class>com.cognizant.fabrication.core.TFederationEvent</class>
<properties>
<!-- Transaction integration -->
<property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="jboss.entity.manager.factory.jndi.name" value="persistence-units/JpaPersistence"/>
</properties>
</persistence-unit>
</persistence>
------------------------------------------------------------
application-context persistence.xml
---------------------------------------
<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/b ... -beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/t ... tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/c ... xt-3.0.xsd">
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="TransactionManager" />
<property name="userTransactionName" value="UserTransaction" />
</bean>
<!--
Creates a EntityManagerFactory for use with the Hibernate JPA provider
-->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceUnitName" value="IndigoPU" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="databasePlatform" value="${hibernate.dialect}" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean>
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/IndigoDS" />
</bean>
<tx:annotation-driven proxy-target-class="true"
transaction-manager="transactionManager" />
</beans>
------------------------
Thanks in advance