-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate with Weblogic 9.2
PostPosted: Fri Aug 03, 2007 2:57 pm 
Newbie

Joined: Tue Feb 14, 2006 3:39 pm
Posts: 3
Hibernate 3.1 with Weblogic

Hello...


I'm using Hibernate withing an MDB in Weblogic. The problem is - data is not saved when save() is called on the Session.

Option show_sql is set to true.

When debugging - selects are shown correctly and data is retrieved. Updates are not being generated for some reason.

I have a feeling it's related to configuration somwhere that I might have missed, but I can't figure this out.

Please help

May hibernate connfigs:
<session-factory>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="current_session_context_class">jta</property>
<property name="session_factory_name">mcliHbSessionFactory</property>
<property name="connection.datasource">TVS</property>
<property name="dialect">org.hibernate.dialect.SybaseDialect</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>

<property name="show_sql">true</property>



<mapping resource="IntTransact.hbm.xml" />
<mapping resource="IntRunlog.hbm.xml" />
<mapping resource="IntError.hbm.xml" />
.....




</session-factory>


</hibernate-configuration>

Code executing is pretty simple:

Code:
hbSession = HibernateUtils.getSessionFactory().getCurrentSession();
IntRunlog intRunlog = trans.getIntRunlog();
hbSession.saveOrUpdate(intRunlog);


EJB Configs are as follows:

<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>TvsTradeImportMDB</ejb-name>
<ejb-class>com.oppen.trd_import.ejb.TvsTradeImportEJB</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>TvsTradeImportMDB</ejb-name>
<method-name>onMessage()</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

_________________
Regards...

Albert F.
====================


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

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.