You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Wesley Acheson <we...@gmail.com> on 2010/01/20 15:05:16 UTC

Dropping down to JDBC.

Hi all,

we have a need to drop down to a JDBC query at some point in our application.

Is it possible to get a connection from the SimpleDataSource pool.  (I
see that this is a method on SimpleDataSource).  If so how does one
return the connection to the SimpleDataSource object?

Regards,

Wesley Acheson.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Dropping down to JDBC.

Posted by Wesley Acheson <we...@gmail.com>.
Okay thats great.

When we do this and call SimpleDataSource.getStatus() after attempting
this. Each time we attempt this. We get badConnectionCount
incremented.

Trying to find the source for this at the moment to see if this is
just a counter or if its iterating through its connection object to
say it has bad connections. Although if anyone knows then this would
be great.

Regards,

Wesley Acheson

On Wed, Jan 20, 2010 at 3:58 PM, Larry Meadors <la...@gmail.com> wrote:
> Just close the connection when you're done - that won't REALLY close
> it, it will just return it to the pool (just like any other connection
> pool).
>
> Larry
>
>
> On Wed, Jan 20, 2010 at 7:17 AM, Wesley Acheson
> <we...@gmail.com> wrote:
>> Yes thats what I suspected.  When the JDBC queries run do I close the
>> connection object returned by this SimpleDataSource object? or is
>> there some other way to return the connection back to the pool?
>>
>> Regards,
>>
>> Wesley Acheson
>>
>> On Wed, Jan 20, 2010 at 3:12 PM, Larry Meadors <la...@gmail.com> wrote:
>>> sqlMapClient.getDataSource();
>>>
>>> On Wed, Jan 20, 2010 at 7:05 AM, Wesley Acheson
>>> <we...@gmail.com> wrote:
>>>> Hi all,
>>>>
>>>> we have a need to drop down to a JDBC query at some point in our application.
>>>>
>>>> Is it possible to get a connection from the SimpleDataSource pool.  (I
>>>> see that this is a method on SimpleDataSource).  If so how does one
>>>> return the connection to the SimpleDataSource object?
>>>>
>>>> Regards,
>>>>
>>>> Wesley Acheson.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>>>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Dropping down to JDBC.

Posted by Larry Meadors <la...@gmail.com>.
Just close the connection when you're done - that won't REALLY close
it, it will just return it to the pool (just like any other connection
pool).

Larry


On Wed, Jan 20, 2010 at 7:17 AM, Wesley Acheson
<we...@gmail.com> wrote:
> Yes thats what I suspected.  When the JDBC queries run do I close the
> connection object returned by this SimpleDataSource object? or is
> there some other way to return the connection back to the pool?
>
> Regards,
>
> Wesley Acheson
>
> On Wed, Jan 20, 2010 at 3:12 PM, Larry Meadors <la...@gmail.com> wrote:
>> sqlMapClient.getDataSource();
>>
>> On Wed, Jan 20, 2010 at 7:05 AM, Wesley Acheson
>> <we...@gmail.com> wrote:
>>> Hi all,
>>>
>>> we have a need to drop down to a JDBC query at some point in our application.
>>>
>>> Is it possible to get a connection from the SimpleDataSource pool.  (I
>>> see that this is a method on SimpleDataSource).  If so how does one
>>> return the connection to the SimpleDataSource object?
>>>
>>> Regards,
>>>
>>> Wesley Acheson.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Dropping down to JDBC.

Posted by Wesley Acheson <we...@gmail.com>.
Yes thats what I suspected.  When the JDBC queries run do I close the
connection object returned by this SimpleDataSource object? or is
there some other way to return the connection back to the pool?

Regards,

Wesley Acheson

On Wed, Jan 20, 2010 at 3:12 PM, Larry Meadors <la...@gmail.com> wrote:
> sqlMapClient.getDataSource();
>
> On Wed, Jan 20, 2010 at 7:05 AM, Wesley Acheson
> <we...@gmail.com> wrote:
>> Hi all,
>>
>> we have a need to drop down to a JDBC query at some point in our application.
>>
>> Is it possible to get a connection from the SimpleDataSource pool.  (I
>> see that this is a method on SimpleDataSource).  If so how does one
>> return the connection to the SimpleDataSource object?
>>
>> Regards,
>>
>> Wesley Acheson.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Dropping down to JDBC.

Posted by Larry Meadors <la...@gmail.com>.
sqlMapClient.getDataSource();

On Wed, Jan 20, 2010 at 7:05 AM, Wesley Acheson
<we...@gmail.com> wrote:
> Hi all,
>
> we have a need to drop down to a JDBC query at some point in our application.
>
> Is it possible to get a connection from the SimpleDataSource pool.  (I
> see that this is a method on SimpleDataSource).  If so how does one
> return the connection to the SimpleDataSource object?
>
> Regards,
>
> Wesley Acheson.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org