-->
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.  [ 6 posts ] 
Author Message
 Post subject: How to configure CMT websphere6.1 and hibernate3.0
PostPosted: Tue May 08, 2007 1:28 pm 
Newbie

Joined: Thu Mar 08, 2007 8:49 am
Posts: 11
Location: Hyd
can any one help me how to configure CMT transactions suing websphere6.1 and hibernate3.0?

Please provide any sample code for hibernate.cfg.xml and HibernateUtil.java for CMT

_________________
Thanks&Regards
Sunil k


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 08, 2007 5:21 pm 
Newbie

Joined: Tue Aug 29, 2006 10:56 am
Posts: 15
My configuration for websphere 6.0. I think it works also for 6.1.

hibernate.cfg.xml
[code]<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
...
<!-- START JTA / EJB/CMT -->
<property name="hibernate.connection.datasource">
java:comp/env/jdbc/mydatasource
</property>

<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.CMTTransactionFactory
</property>
<property
name="hibernate.transaction.flush_before_completion">
true
</property>
<property name="hibernate.transaction.auto_close_session">
true
</property>

<!-- END JTA / EJB/CMT -->
....
</session-factory>
</hibernate-configuration>

For HibernateUtil.java see:

[url]http://www.hibernate.org/42.html#A7
[/url]


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 09, 2007 3:38 am 
Newbie

Joined: Thu Mar 08, 2007 8:49 am
Posts: 11
Location: Hyd
Thanks for Reply

I am not using the connection pooling so i add all properties except below property

<property name="hibernate.connection.datasource">
java:comp/env/jdbc/mydatasource
</property>


My problem is data is not storeing in data base. It is showing changes in ui. i tihink commit is not issuing the end. I am not getting any exception.


Please help me?

_________________
Thanks&Regards
Sunil k


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 09, 2007 10:30 am 
Newbie

Joined: Thu Mar 08, 2007 8:49 am
Posts: 11
Location: Hyd
I am new to websphere and ejb

I Created oracle jndi in websphere.

could you please tell me how to bind it in ejb-jar.xml

_________________
Thanks&Regards
Sunil k


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 5:03 am 
Newbie

Joined: Thu Mar 08, 2007 8:49 am
Posts: 11
Location: Hyd
My problem is solved
for using CMT , Should configure data source in websphere
Thanks mba for giving reply

_________________
Thanks&Regards
Sunil k


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 6:18 am 
Newbie

Joined: Tue Aug 29, 2006 10:56 am
Posts: 15
Hi sunilk,

please rate the reply if you find it helpful.

Thanks.

Kind regards

mba


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.