I have name of a savepoint, can i rollback to that savepoint?
Hi
Thank you for reading my post
I have name of a savepoint in my method and connection which that savepoint belongs to.
Now what i need it to rollback to that savepoint but problem is that Connection object rollback method does not accept savepoint name and it just accept savepoint Object to rollback to it.
So, is there any way to rollback to a save point when we just have name of that savepoint?
Thanks
[444 byte] By [
Legolas.wa] at [2007-11-27 5:13:35]

# 1
If you're using JDBC to create your savepoints, just pass the Savepoint object into the rollback method.
If you're creating them with native commands, then use native commands to effect the partial rollback.
But no, if you've created a Savepoint object and then discarded all references to it there's no way to retrieve it subsequently.
# 2
Thank you for reply.
Indeed i have one connection inside several methods and each method can put an String into a HashMap which this string is the same as savepoint name which that specific method has sets.
Now if i need to rollback to one of those savepoints what should i do?
I only have String name of the savepoint.
thanks
# 5
Probably not, though it could be if the driver writer so desired. But being serializable isn't a requirement for storing something in a HashMap.
So yes, you can put savepoints into a HashMap. You can't "reuse" them however - if you've rolled back to a savepoint you can't rollback again.