This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Attribute issue in weblogic 8.1

 
Madi Muthukumaran
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have problem with the transaction attribute of my session bean in Weblogic8.1 and SQLServer. Following is the description.

I have two beans, say SampleBeanOne and SampleBeanTwo. The transaction attribute of SampleBeanOne is "Required" and that of the SampleBeanTwo is "RequiresNew".

In SampleBeanOne i am trying the execute the a batch of insert quires using PreparedStatement.addBach() and PreparedStatement.executBatch() in a loop that runs of 5 times.

Inside the loop i am calling a method in SampleBeanTwo to get the next sequence. In that method i am updating the squence and selecting the new value.

Now the problem i am facing is that when i call the executeBatch() in the PreparedStatement only the final insert statement added to the batch is called and the insert statement added gets vanished.

If i change the transaction attribute of the SampleBeanTwo to "Required" the code is working fine. But i can't do that since the SampleBeanTwo is accessed throught out my application.

The same peace of code is working properly with Websphere5 and SQL server combination.

Kindly help me out in this issue.

Regards
 
Madi Muthukumaran
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I raised the issue to the BEA support, they said that the issue is the driver that i am using. It got resolved when i tried with the BEA provided driver. They call it the BEA branded driver for SQL Server.

Regards
Muthu
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic