Hey out there,
using JdbcTemplate in Websphere caused some connection pooling issues
for us, too. What turned out to be the problem was us using the
DataSourceTransactioManager instead of the one dedicated to WebSphere.
So in cases of polling problems check if you use the right one :)
Regards Ol
One thing you could do is call getConnection() twice and then
System.out.println( con1 == con2 )
Then email him the 'false' response. He can't deny that.
On Aug 4, 12:42 am, Arulin of ACBL wrote:
> Thankyou all,
>
> The getConnection() was our senior level Java developer's idea...
> Kinda fig
Thankyou all,
The getConnection() was our senior level Java developer's idea...
Kinda figured JDBCTemplete would buck that but no way I was going to
prove it to him. Seriously, no one here trust me (alittle HADD) so
I'll have to run this through him, at least I have this information to
back me up
Agreed. Personally I'd get rid of the isJDBCConnectionClosed() method
entirely, for a few reasons.
First, as Mike and Mark say, each call to getDataSource().getConnection
() is grabbing a new connection from the DataSource, so it looks like
you're leaving a lot of connections open that JdbcTempl
Thanks for that, I'd been looking around for how to do that, but had
been looking in Java > Editor > Templates instead of Java > Code Style
> Code Templates. The Eclipse preferences are vast and confusingly
organised...
Mwanji
--~--~-~--~~~---~--~~
You received thi
exacttly - the whole point of JdbcTemplate is that you do not need to
do any connection management.
Spring 101.
R
On Sat, Aug 1, 2009 at 8:53 AM, Colin B-S wrote:
>
> Keith is right, this is more likely to be your configuration in
> WebSphere.
> Also the JDBCTemplate will close your connection
Keith is right, this is more likely to be your configuration in
WebSphere.
Also the JDBCTemplate will close your connection for you. If the
connection is configured as a pooled connection then the close() just
returns it to the pool.
Colin.
On Jul 31, 3:14 pm, Arulin of ACBL wrote:
> Hello Java
On 1 Aug 2009, at 08:00, Dominic Mitchell wrote:
> On 31 Jul 2009, at 15:14, Arulin of ACBL wrote:
>> } catch (SQLException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>
> I hate Eclipse sometimes.
Sorr
that's what I said! :) geesh :)
On Aug 1, 5:44 pm, Mark Derricutt wrote:
> Hmm didn't spot that to start with - I'd say your right. A new
> connection would be pulled from the pool and closed, leaving the
> original connection still "open".
> --
>
>
>
> On Sat, Aug 1, 2009 at 7:41 PM, Mike Jon
Hmm didn't spot that to start with - I'd say your right. A new
connection would be pulled from the pool and closed, leaving the
original connection still "open".
--
On Sat, Aug 1, 2009 at 7:41 PM, Mike Jones wrote:
> Isn't
> this.getDataSource().getConnection().close() asking for a connection
>
Aren't the chained method calls to
this.getDataSource().getConnection()... a bit suspect? Aren't they
trying to pull a fresh connection of the pool each time but then
aren't being closed. Isn't
this.getDataSource().getConnection().close() asking for a connection
from the pool and then closing (ret
Again, i dont know much about JDBCtemplete but i would expect you need
to jump though hoops to close connections. This should be managed..
that doesnt answer your question but you could be barking up the wrong
binary tree.
(Datasources don't give you real connections anyway. not the good
ones a
Interestingly, I'm currently also trying to diagnose some oddness with
JdbcTemplate as well, whilst the code looks like its closing the
Response, the Statement, and the Connection - my connection pool
(Atomikos) decides to log several hundred 'warnings' that its forcing
statements closed cause the
I don't anything about JDBCtemplete but would this.getDataSource
().getConnection() give you a new connection every time? rather than
a single instance as this code expects? (or am i on crack).
On Aug 1, 5:00 pm, Dominic Mitchell wrote:
> On 31 Jul 2009, at 15:14, Arulin of ACBL wrote:
>
> >
On 31 Jul 2009, at 15:14, Arulin of ACBL wrote:
> } catch (SQLException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
I hate Eclipse sometimes.
-Dom
--~--~-~--~~~---~--~---
Knowing what version of Spring you are using might also be handy.
On Sat, Aug 1, 2009 at 12:14 AM, Arulin of ACBL wrote:
>
> Hello Java Posse,
>
> Our system Admin is tearing his hair out over JDBCtemplete, it is not
> closing threads that it opens between Websphere App Server and DB2, we
> are o
My understanding is that Spring JDBC's JdbcTemplate just gets
Connections from the DataSource object -- it doesn't spin up threads
on its own. I'd look at the DataSource configuration, as that's where
the connection and thread pooling ought to be happening.
What does your DataSource's JNDI confi
17 matches
Mail list logo