-
1. Re: Data Updations are not happening
hrangamana Oct 26, 2001 4:05 AM (in response to ganesh_pai)Hi Ganesh,
What database are you using? Some database require closing the connection after **each** request in order to have the change propagated into the database. Otherwise, have a look at commit options. You're seemingly using commit options A. Set it into Commit options B, or C ...
Enjoy coding
--Hermann -
2. Re: Data Updations are not happening
ganesh_pai Oct 27, 2001 3:26 AM (in response to ganesh_pai)Hi,
I am using Oracle 8i as my database .
I am also closing the connection after each request.
Also where do i set the Commit options ? Is it in
the jboss.jcml file ?
I had tried a workaround which worked,though I am not sure if it is the right approach.It involved using "con.setAutoCommit(true)" after getting the connection.
Thanks and Regards
Ganesh -
3. Re: Data Updations are not happening
davidjencks Oct 27, 2001 8:44 PM (in response to ganesh_pai)If you are accessing the datasource directly from a jsp or servlet or mbean you are not participating in the ejb containers transaction management. So you have to manage transactions yourself. One way is by setting autocommit(true), although if you also use these connections from ejbs you will have to remember to set it false before you return. Another possibility is to call commit() on the connection before closing it.
NOTE: THIS ONLY APPLIES TO CONNECTION USAGE WITHIN JSPS OR SERVLETS, NOT BMP EJBS!! -
4. Re: Data Updations are not happening
erik777 Oct 28, 2001 1:11 AM (in response to ganesh_pai)My problem may be the same as yours. I've been hitting my head trying to figure out why I have transaction deadlocks. Basically, I can view and update, but when I try to create, I get a transaction deadlock.
I have the problem both with MySQL and SQL Server. I thought I solved the problem with SQL Server, but then noticed that it never seemed to commit the changes. I can update and add lots of data, only to find when I shut down and restart JBoss, none of it was saved.
This explains my deadlock problem. If it is never commiting, then naturally a transaction deadlock can occur. Does anyone have any idea why it wouldn't commit?
I switched to commit-option B to solve an earlier problem, from A. I tried every transaction isolation option available. I originally had the trans-attribute for all methods set to Required, later changing it to match a BMP example.
In the example, all Home methods were set to "NotSupported". Setting the create to "Required" does not appear to have an effect. It should not matter anyway. It should autocommit if a transaction isn't declared. Can someone help, please?
Thanks,
Erik
mailto:e@technologist.com -
5. Re: Data Updations are not happening
ganesh_pai Oct 29, 2001 11:54 AM (in response to ganesh_pai)Thanks for the Tip,it's making sense now
Regards
Ganesh -
6. Re: Data Updations are not happening
speedy_omen Aug 1, 2003 1:31 AM (in response to ganesh_pai)you'll need a XADataSourceLoader in your jboss.jcml ... Then transactions will be committed