Please check the logs for any errors.
For me, the easiest way to test this would be to copy the java code to an external IDE (e.g. Eclipse / Netbeans) and test the code there.
Those IDEs are inherently better suited to debug any code related issues.
Once the code works there, I move it to the Jave Tx in Developer and make the final small modifications (put import, helper functions etc into the expected tabs; remove debug output etc, once it works fine there as well).
If you want to track what is going on at a certain point of the Java Tx execution, you can use the logInfo() callable API in the code to write to the mapping log. Those messages can be located by searching for JTX_0012 in the log file.