File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does commit return before transaction complete

 
Raj Bhandari
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a ques.. can you tell me whats going on here:
I request an update and then try to read the updated data.. but I do not see the changes in my jsp (I do see the changes in database).. then I do a refresh on my jsp again which calls getDetails() method and this time I do see the changes on jsp also.
So does this mean that the jdbc commit is taking its time in the background while it returns the control back to the update method ?
Here's a quick simple idea of what I do:



Any help is appreciated.. Tks!
 
Raj Bhandari
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no suggestions ??
 
Justin Chu
Ranch Hand
Posts: 209
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't think this is a database issue. Do some debugging and check your request/response cycle.
 
Raj Bhandari
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chu,
If I go in debugging mode.. I can't get it to fail because I think I've slowed the process down and so this race condition never occurs. any other suggestions ?
tks
 
Arulanand Dayalan
Ranch Hand
Posts: 126
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you Clear the cache in your Jsp. This could be because of that. If this code is not in your jsp, add it and check it out.


Hope this helps.

Thanks and Regards,
Arul.
 
Raj Bhandari
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arul,

Tks for the suggestion but its not a jsp cache issue because I have multiple tiles (using struts) in my jsp and all come back with the latest updated values except one particular tile which comes from a table which has to do some extra work via its triggers when I update that table.
I've put debugging statements before and after the service calls and it clearly shows old data for that table coming back.. but when I call that service to get results from that table again.. everything is fine.
I have no ideas what can I do to tell my update method to wait until the commit is totally complete. Not even sure if its that issue..
tks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic