The problem was my misconception in the sequence of creating the connection and the begin of a local transaction that used it. Of course the transaction begins before the getConnection() is called. I only had to move the creation of the connection to the ctor of the ManagedConnection. Problem solved.
Can you provide more details on how you solved this problem? i am facing the exact same problem.