Quote:
The transaction isolation level hasn't been configured in Weblogic. We are getting connections from a JDBC connection pool, configured in Weblogic.
Try setting the isolation level there.
Quote:
I agree with you that the first one is in the commit process while the second executes. But since I'm using CMT, shouldn't the commit process happen immediately at the end of the method.
That's my understanding too, but there are different softwares involved here. Some databases might tend to be a little bit non blocking, like MySQL delayed inserts and I am not aware how commit is handled on both sides (Java, DB). I don't know how fast your fast enough is but if it is in order of seconds then we have a problem. If it is in order of milliseconds then you might want to overlook that.
Quote:
A colleague of mine, found out that if we do not set the session object in the HibernateUtil class to 'threadLocal', the create and find works allright.
This is very suspicious since in your case it should not make a different. What is the sequence of method calls in the first step?
Quote:
Since the session is not threadLocal, this could lead to thread issues. But maybe not, if a new session is created for every Session bean method. Do you know if this is true, Farzad?
A new session is made for every bean method call anyways since app servers create a thread for each call. I don't think that will in anyways result in concurrency issues but it might have performance drawbacks and at the same time roll backs might not be very reliable but this all depends on the sequence of method calls and it will be case by case. I do suggest you stick to the threadlocal solution.
Umm, one last thought: what happens if you call session.flush at the end of the first step?
Farzad-