-->
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.  [ 5 posts ] 
Author Message
 Post subject: JBoss / Hibernate / BMP (CMT) / DB2 / JDBC - DB locks are no
PostPosted: Mon Jul 31, 2006 7:22 am 
Newbie

Joined: Mon Jul 31, 2006 7:15 am
Posts: 5
I am using

>>>JBoss-3.2.5
>>>Hibernate-2.0.3
>>>BMP with CMT EJB's - Using requires transaction attribute. EJB's use Hibernate
>>>DB2-8.1.7

I have a situation where Hibernate is used to create insert there records into DB and creating three entity beans for each record.

Once the above process is complete i am invoking a JDBC call to get some information from the same table where hibernate has inserted three new records. Once i try to execute the query through JDBC, app just hangs.

When i monitor the connections in the DB2 i can see lock waiting and when i kill the connection that is creating the lock then app resumes with exception.

Now i am trying to figure out where the problem could be? Can some one please help me with this.

Thanks.


Top
 Profile  
 
 Post subject: JBoss / Hibernate / BMP (CMT) / DB2 / JDBC - DB locks
PostPosted: Tue Aug 01, 2006 10:32 am 
Newbie

Joined: Mon Jul 31, 2006 7:15 am
Posts: 5
Till now not i am not able to figure out the problem. I got response from JBoss forums and there they'r asking me to post in hibernate forums.

Please check the URL below to view the discussion in JBoss forum.

http://www.jboss.com/index.html?module= ... 86#3962186

Right now we think that transactions are not committed when inserts are made using hibernate.

I have been working this for almost a week without much progress any help is welcomed.


Top
 Profile  
 
 Post subject: JBoss / Hibernate / BMP (CMT) / DB2 / JDBC - DB locks are no
PostPosted: Wed Aug 02, 2006 8:17 am 
Newbie

Joined: Mon Jul 31, 2006 7:15 am
Posts: 5
After diggin thorugh logs i found out that all the SELECT, UPDATE is happening proprely through the hibernate.

Insert statements alone seems to be creating trouble. When i kill the thread that is trying to perform the insert im getting a stack trace as below.

at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:335)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:468)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)

Looking at this i can figure out that there is some problem with the insert but this is not helping me to figure out the root cause for the problem.

Still now i am not sure what is causing this problem. Can some please help me.

Thanks


Top
 Profile  
 
 Post subject: JBoss / Hibernate / BMP (CMT) / DB2 / JDBC - DB locks are no
PostPosted: Thu Aug 10, 2006 7:01 am 
Newbie

Joined: Mon Jul 31, 2006 7:15 am
Posts: 5
There has been lot of activity on this query in JBoss Transaction forum use the below link to follow it up.

http://www.jboss.com/index.html?module= ... 12#3964312

Still now we are not able to conclude what is the real problem and how to solve it. Hence please help to solve it.

Thanks.


Top
 Profile  
 
 Post subject: JBoss / Hibernate / BMP (CMT) / DB2 / JDBC - DB locks are no
PostPosted: Mon Aug 14, 2006 2:32 am 
Newbie

Joined: Mon Jul 31, 2006 7:15 am
Posts: 5
This problem is resolved.

http://www.jboss.com/index.html?module= ... 90#3964890

Thanks


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