-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Overriding hibernate.transaction.factory_class is dangerous
PostPosted: Mon Jan 30, 2012 8:20 pm 
Newbie

Joined: Mon Jan 30, 2012 7:04 pm
Posts: 4
Overriding hibernate.transaction.factory_class is dangerous, this might break the EJB3 specification implementation
I'm seeing this warning with Weblogic 10.3, JPA, Container Managed Transactions but have been unable to resolve it.

Can someone point me to the issue with my configuration?

Thanks,

-Bill

Code:
<bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
      <property name="dataSource" ref="dataSourceXA" />
      <property name="persistenceUnitManager" ref="persistenceUnitManager" />
      <property name="jpaVendorAdapter">
         <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
            <property name="showSql" value="false" />
            <property name="generateDdl" value="false" />
            <property name="database" value="ORACLE" />
            <property name="databasePlatform" value="org.hibernate.dialect.Oracle10gDialect" />
         </bean>
      </property>

      <!-- configure Hibernate -->
      <property name="jpaPropertyMap">
         <map>
            <entry key="javax.persistence.transactionType" value="jta" />
            <entry key="hibernate.transaction.factory_class"
               value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory" />
            <entry key="hibernate.transaction.manager_lookup_class"
               value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
            <entry key="hibernate.current_session_context_class" value="org.hibernate.context.JTASessionContext" />
         </map>
      </property>
   </bean>

   <bean id="dataSourceXA" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="resourceRef">
         <value>false</value>
      </property>
      <property name="jndiName">
         <value>OracleXaDataSource</value>
      </property>
   </bean>

   <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="resourceRef">
         <value>false</value>
      </property>
      <property name="jndiName">
         <value>OracleDataSource</value>
      </property>
   </bean>

   <bean id="transactionManager"
      class="org.springframework.transaction.jta.WebLogicJtaTransactionManager"
      autowire="default">
      <property name="transactionManagerName" value="javax.transaction.TransactionManager" />
   </bean>

   <tx:annotation-driven transaction-manager="transactionManager" />


Top
 Profile  
 
 Post subject: Re: Overriding hibernate.transaction.factory_class is dangerous
PostPosted: Tue Jan 31, 2012 3:43 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
This is only a warning message.
I believe your configuration is Ok and you can simply ignore the warning message.


Top
 Profile  
 
 Post subject: Re: Overriding hibernate.transaction.factory_class is dangerous
PostPosted: Tue Jan 31, 2012 12:14 pm 
Newbie

Joined: Mon Jan 30, 2012 7:04 pm
Posts: 4
Thanks. It's annoying but I guess I can live with it.


Top
 Profile  
 
 Post subject: Re: Overriding hibernate.transaction.factory_class is dangerous
PostPosted: Thu Feb 02, 2012 4:04 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
That what you can do, is to disable logging of warnings level from Ejb3Configuration.class by setting the level to ERROR

Code:
log4j.logger.org.hibernate.ejb.Ejb3Configuration=ERROR


In this way, you get rid of this message.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.