You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by angela gormley <an...@IcomMobile.com> on 2002/03/07 10:20:47 UTC

Should DataSourceComponent really be ThreadSafe

Hello folks,
We have recently adopted the AValon Component framework and replaced our own
JDBC Service with one using Avalon classes. When running with a
multithreaded application on WebLogic 6.1 we get strange results which we
think may be caused by am incompatibility between our JDBC Access component
and the Avalon DataSourceComponent.

We want the JDBCAccess Component to be SingleThreaded ( multi instance )
however the DataSOurceComponent we wish to use implements ThreadSafe .... Is
this intentional , surely making the DataSourceComponent  a singleton
defeats the purpose of having mutilpe Connection pools n the first place  ??

Looking forward to your reasoning for doing this .

Angie

Angela Gormley
iCOM Mobile Ltd
Tel:  028 90232023


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Should DataSourceComponent really be ThreadSafe

Posted by Berin Loritsch <bl...@apache.org>.
bill pope wrote:
> Hi,
> I work with Angela and we agree that the question should be refined a
> little. We are using the J2eeDataSource implimentation of the
> DataSourceComponent interface. Also Angela meant to say a single connection
> pool with muliple connections rather than "mutilpe Connection pools". In
> multi-user stress testing we seem to have hit a bottle neck and we wondered
> if the fact that the J2eeDataSource component was a singleton might be the
> problem. Could someone provide us with an explanation as to why it is a
> singleton. Is it just a wrapper to get at the pooled db connections and so
> the singleton appraoch is required to aid the mangement of the db connection
> pool. Sorry if this seems trivial.


The J2EE implementation merely connects to the JNDI system and grabs a
reference to the DataSource there.  Whether your J2EE implementation
supports pooling or not does not affect the J2eeDataSourceComponent.  It
is a rather simplistic approach.

If there is any bottleneck, it is in the J2EE container.

The JdbcDataSourceComponent is our responsibility, and we will be happy
to address any bottlenecks or issues you see with that.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Should DataSourceComponent really be ThreadSafe

Posted by bill pope <bi...@icommobile.com>.
Hi,
I work with Angela and we agree that the question should be refined a
little. We are using the J2eeDataSource implimentation of the
DataSourceComponent interface. Also Angela meant to say a single connection
pool with muliple connections rather than "mutilpe Connection pools". In
multi-user stress testing we seem to have hit a bottle neck and we wondered
if the fact that the J2eeDataSource component was a singleton might be the
problem. Could someone provide us with an explanation as to why it is a
singleton. Is it just a wrapper to get at the pooled db connections and so
the singleton appraoch is required to aid the mangement of the db connection
pool. Sorry if this seems trivial.

Thanks again

Bill

-----Original Message-----
From: angela gormley [mailto:angela.gormley@IcomMobile.com]
Sent: 07 March 2002 09:21
To: avalon-dev@jakarta.apache.org
Cc: Vincent Massol (Icom) (E-mail); Bill (E-mail); Dave Garthwaite
(E-mail)
Subject: Should DataSourceComponent really be ThreadSafe


Hello folks,
We have recently adopted the AValon Component framework and replaced our own
JDBC Service with one using Avalon classes. When running with a
multithreaded application on WebLogic 6.1 we get strange results which we
think may be caused by am incompatibility between our JDBC Access component
and the Avalon DataSourceComponent.

We want the JDBCAccess Component to be SingleThreaded ( multi instance )
however the DataSOurceComponent we wish to use implements ThreadSafe .... Is
this intentional , surely making the DataSourceComponent  a singleton
defeats the purpose of having mutilpe Connection pools n the first place  ??

Looking forward to your reasoning for doing this .

Angie

Angela Gormley
iCOM Mobile Ltd
Tel:  028 90232023


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>