You could implement your own transaction manager and do the initiailzation
there before returning the connection to iBATIS.
Jeff Butler
On Dec 12, 2007 4:19 AM, Denis Karpov <[EMAIL PROTECTED]> wrote:
> I can't use ping query because i can't specify parameters in it.
>
> > That would be the ping query (to test if the connection is alive)?
> >
> > <transactionManager type="JDBC">
> >
> > <dataSource type="SIMPLE">
> >
> > <property value="${driver}" name="JDBC.Driver"/>
> >
> > <property value="${url}" name="JDBC.ConnectionURL"/>
> >
> > <property value="${username}" name="JDBC.Username"/>
> >
> > <property value="${password}" name="JDBC.Password"/>
> >
> > <property value="15" name="Pool.MaximumActiveConnections"/>
> >
> > <property value="15" name="Pool.MaximumIdleConnections"/>
> >
> > <property value="1000" name="Pool.MaximumWait"/>
> >
> > * <property name="Pool.PingQuery" value="SELECT 1 FROM Company"/>*
> >
> > * <property name="Pool.PingEnabled" value="true" />*
> >
> > * <property name="Pool.PingConnectionsOlderThan" value="1000000"
> />*
> >
> > </dataSource>
> >
> > </transactionManager>
> >
> >
> >
> > -----Original Message-----
> > From: Denis Karpov [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 12, 2007 12:01 PM
> > To: [email protected]
> > Subject: On Before Get Connection
> >
> >
> >
> > When iBatis gets a connection from the pool for processing, how can I
> >
> > execute some initialization SQL before this connection will be used by
> >
> > iBatis?
> >
> > Thanks
> >
>
>