Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling RemoteException  RSS feed

 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there...
I'm implementing a remote object in RMI, which basically performs a transaction that updates the database. My question is how would the client application be able to know if the transaction completed if a RemoteException is thrown cause from what I know, it is possible that the RemoteException occured after the transaction completed like while returning an object. I think that it is impossible to know if the transaction indeed
completed when a RemoteException is thrown. If this is so, how should I handle RemoteException.
Thanks... your help will be very much appreciated.
Jerson
 
Jim Baiter
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are only two things I could think of. One would be a transaction monitor which the client could query to determine the state of the transaction. Second, could the server code
catch and rethrow the RemoteException concatenating the message
with the transaction state?
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply...
The second solution won't work. The RemoteException I was referring to is the RemoteException that occurs while transmitting the return value. For your first solution, are you referring to JTS? If yes, is this normally use for developing transactional system using RMI?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!