java - Hibernate JPA peristence configuration in Jboss -


i moved hibernate persistence instead of openjpa persistence , changed persistence.xml below

      <persistence-unit name="pac">        <provider>org.hibernate.ejb.hibernatepersistence</provider>        <jta-data-source>pac</jta-data-source>     <class>xxxx</class>     <class>xxxx</class>     <class>xxxxx</class>     <class>xxxxxr</class>     <class>xxxxx</class>     <exclude-unlisted-classes>false</exclude-unlisted-classes>        </persistence-unit>     <persistence-unit name="user">    <provider>org.hibernate.ejb.hibernatepersistence</provider>      <jta-data-source>tuser</jta-data-source>         <class>xxxxr</class>       <class>xxxxx</class>       <class>xxxxx</class>      <exclude-unlisted-classes>false</exclude-unlisted-classes>        <properties>          <property name="hibernate.dialect"  value="org.hibernate.dialect.oracledialect"/>     <property name="hibernate.connectionurl" value="jdbc:oracle:thin:@xxxxxx:1521:pac811"/>     <property name="hibernate.connectiondrivername" value="oracle.jdbc.oracledriver"/>     <property name="hibernate.connectionusername" value="xyz"/>     <property name="hibernate.connectionpassword" value="abc"/>           <property name="hibernate.connection.provider_class"       value="org.hibernate.connection.c3p0connectionprovider" />     <property name="hibernate.c3p0.max_size" value="100" />     <property name="hibernate.c3p0.min_size" value="0" />     <property name="hibernate.c3p0.acquire_increment" value="1" />     <property name="hibernate.c3p0.idle_test_period" value="300" />     <property name="hibernate.c3p0.max_statements" value="0" />     <property name="hibernate.c3p0.timeout" value="100" />    </properties> 

i added org.hibernate.ejb.hibernatepersistence , c3p0 property,oracle dialect in existing persistence xml changed code , compiling fine. worrying configuration steps required when deployed in jboss hibernatepersistence,oracle dialect , c3p0 connection. current jboss server jboss redhat 6.4 using hibernate 4.2.1. body on helpful if provide steps.

you in jboss , must use datasource configured in jboss.

remove these lines

 <property name="hibernate.connectionurl" value="jdbc:oracle:thin:@xxxxxx:1521:pac811"/> <property name="hibernate.connectiondrivername" value="oracle.jdbc.oracledriver"/> <property name="hibernate.connectionusername" value="xyz"/> <property name="hibernate.connectionpassword" value="abc"/>       <property name="hibernate.connection.provider_class"   value="org.hibernate.connection.c3p0connectionprovider" /> <property name="hibernate.c3p0.max_size" value="100" /> <property name="hibernate.c3p0.min_size" value="0" /> <property name="hibernate.c3p0.acquire_increment" value="1" /> <property name="hibernate.c3p0.idle_test_period" value="300" /> <property name="hibernate.c3p0.max_statements" value="0" /> <property name="hibernate.c3p0.timeout" value="100" /> 

is tuser datasource configured in standalone.xml?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -