If I want to use a client user transaction, i.e., not through EJB but through a client application directly. How to get a connection? If I connect to database by using the JNDI name, I will get a JDBC connection which the transaction cannot be controlled by me. In brief, I have written a Transaction Manager, and want to substitute the TM of JBoss, but I don't know how to test the ClientUserTransaction. Can anybody give me some advice?