There's a new method .getCurrentConnection() you can use to get the
connection currently in use, whether you used .startTransaction() or
.setUserTransaction().

Clinton

On 6/5/07, Yu, Jack <[EMAIL PROTECTED]> wrote:

 Hi,

        We are trying to handle custom types (such as Oracle Object), the
only way we find out now is to
        get the connection instance from 
SqlMapper.getDataSource().getConnection(),

        and set the typeMap in that connection, and set it back using
SqlMapper.setUserConnection.

        The API document  says:

        "Using a user supplied connection basically sidesteps the
transaction manager,
    so you are responsible for appropriately"

        The reason that we call "setUserConnection" is that SqlMapper will
eventually use "userConnection"
        to perform the SQL transactions, and SqlMapper.getUserConnectionis 
deprecated, and
        "userConnection" value is not the same as 
SqlMapper.getDataSource().getConnection().
What's the magic
        reason under that??

        is there any better way to handle it?

        Thanks

        -- Jack


Reply via email to