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