Subject TPB getAttribute neither as int or String!
Author dhay@lexmark.com
Hi,

I've been trying to understand TransactionParameterBuffer, so I simply
tried to print out its contents (btw, it would be VERY nice to be able to
do this without getting every parameter - is there a reason why
getArgumentsList() is private?).

however, I can't seem to get some of the attributes, either as an int or as
a String, the only 2 methods available. eg

System.out.println("has READ_COMMITTED: " +
tpb.hasArgument(TransactionParameterBuffer.READ_COMMITTED));

returns true.

However, both

System.out.println("READ_COMMITTED: " +
tpb.getArgumentAsInt(TransactionParameterBuffer.READ_COMMITTED));
System.out.println("READ_COMMITTED: " +
tpb.getArgumentAsString(TransactionParameterBuffer.READ_COMMITTED));

throw exceptions!

Can someone explain?


Also, can someone explain how I set different attributes, and which ones
need which addArgument(...) method? I couldn't find it anywhere in the
docs or in the source.

For example, I tried:


txSettings.addArgument(TransactionParameterBuffer.CONSISTENCY);

but then couldn't read it as either Int or String.

This is very confusing!

cheers,

David
x54680