GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Attribute issue in weblogic 8.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Attribute issue in weblogic 8.1" Watch "Transaction Attribute issue in weblogic 8.1" New topic
Author

Transaction Attribute issue in weblogic 8.1

Madi Muthukumaran
Greenhorn

Joined: Oct 16, 2003
Posts: 11
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

Joined: Oct 16, 2003
Posts: 11
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Transaction Attribute issue in weblogic 8.1