wrap transaction around dumping
fix tx handling
support for optimistic locking
reverting to original TCK class
handle empty tx stack gracefully

might happen on explicit call to session.disconnect(). Also some more logging added.