ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu, Jack" <Jack...@fmr.com>
Subject RE: How to use TypeMap correctly?
Date Mon, 11 Jun 2007 12:48:01 GMT
    Thanks for response. We have tried getCurrentConnection, but we are
getting "null" back. Because we are not calling startTransaction or
setUserTransaction explicitly.
    Do you think we have to call startTransaction/setUserTransaction
explicitly to set TypeMap? Is there any other alternative? Currently we
set it in our customized 
    HandleCallback class. Not sure whether that's the proper way.
    Thanks again.
    -- Jack


	From: Clinton Begin [mailto:clinton.begin@gmail.com] 
	Sent: Friday, June 08, 2007 9:25 AM
	To: user-java@ibatis.apache.org
	Subject: Re: How to use TypeMap correctly?
	There's a new method .getCurrentConnection() you can use to get
the connection currently in use, whether you used .startTransaction() or
	On 6/5/07, Yu, Jack <Jack.Su@fmr.com> wrote: 


			        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
			        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
			        to perform the SQL transactions, and
SqlMapper.getUserConnection is 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? 


			        -- Jack 

View raw message