RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-11 Thread Shahar Solomianik

Keep in mind you can use Oracle Connection Manager tool which "pools"
connection in the dbms, outside the app server.
It keeps allocated resources for closed connection to bind it to new ones,
thus making the connection physical creation much faster.
Shahar

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Taylor
Sent: Wednesday, April 11, 2001 2:21 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


Oracle's DataSources don't do pooling in the sense of maintaining pools
of physical connections (nneded for speed).  Oracle calls minerva's type
of pooling "connection caching" in their documentation for their JDBC
2.0 drivers.

Oracle provides an "example" implementation of a cache called
OracleConnectionCacheImpl (implements DataSource).  You instantiate the
cache with one of the pooling data sources (OracleXADataSource or
OracleConnectionPoolDataSource).  The cache then does what minerva does
in terms of pooling -- but not as conveniently or portably.

I also found what appears to be a limitation in the
OracleConnectionCacheImpl.  It did not appear to work correctly with
OracleXADataSources.  The cache allocates from the XA data source you
give it by calling getPooledConnection() -- not getXAConnection().  I
was able to call commit() on one of the connections from the supposedly
XAConnection cache, and that's not good.  There was no source code
nearby, so I gave up and just went with minerva.

Now if I could just get an example minerva's JDBCDataSourceLoader
working.   The trouble is that there are places that are outside the
container where you need data sources.  One example is, I think, in
using the database for authentication.  You need access to a connection,
but you are outside a container (in the SecurityInterceptor?).  Another
example is in custom MBean services where you might want to use the
database to store configuration information.

You can use physical connections from the minerva XA pool outside the
container and manually commit them if you want, but it seems wrong to do
that.

Tim



Toby Allsopp wrote:

 On Tue, Apr 10, 2001 at 05:55:27PM +0200, Shahar Solomianik wrote:

 Toby, I think you are right.
 I replaced the mbean configuration to use XADataSourceLoader and minerva
(I
 had to patch minerva to support scrollable result sets...), tested the
 server under load and it was MUCH faster.
 I didnt get into details and log/trace files, but the differences in
speed
 were visible to the human eye 


 I'd be very interested to hear of any deeper investigation of this. It
 might be as simple as the Oracle DataSource implementation not doing
 pooling.

 Toby.

 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-10 Thread Toby Allsopp

On Tue, Apr 10, 2001 at 05:55:27PM +0200, Shahar Solomianik wrote:
 Toby, I think you are right.
 I replaced the mbean configuration to use XADataSourceLoader and minerva (I
 had to patch minerva to support scrollable result sets...), tested the
 server under load and it was MUCH faster.
 I didnt get into details and log/trace files, but the differences in speed
 were visible to the human eye 

I'd be very interested to hear of any deeper investigation of this. It
might be as simple as the Oracle DataSource implementation not doing
pooling.

Toby.

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-10 Thread Tim Taylor

Oracle's DataSources don't do pooling in the sense of maintaining pools 
of physical connections (nneded for speed).  Oracle calls minerva's type 
of pooling "connection caching" in their documentation for their JDBC 
2.0 drivers.

Oracle provides an "example" implementation of a cache called 
OracleConnectionCacheImpl (implements DataSource).  You instantiate the 
cache with one of the pooling data sources (OracleXADataSource or 
OracleConnectionPoolDataSource).  The cache then does what minerva does 
in terms of pooling -- but not as conveniently or portably.

I also found what appears to be a limitation in the 
OracleConnectionCacheImpl.  It did not appear to work correctly with 
OracleXADataSources.  The cache allocates from the XA data source you 
give it by calling getPooledConnection() -- not getXAConnection().  I 
was able to call commit() on one of the connections from the supposedly 
XAConnection cache, and that's not good.  There was no source code 
nearby, so I gave up and just went with minerva.

Now if I could just get an example minerva's JDBCDataSourceLoader 
working.   The trouble is that there are places that are outside the 
container where you need data sources.  One example is, I think, in 
using the database for authentication.  You need access to a connection, 
but you are outside a container (in the SecurityInterceptor?).  Another 
example is in custom MBean services where you might want to use the 
database to store configuration information.

You can use physical connections from the minerva XA pool outside the 
container and manually commit them if you want, but it seems wrong to do 
that.

Tim



Toby Allsopp wrote:

 On Tue, Apr 10, 2001 at 05:55:27PM +0200, Shahar Solomianik wrote:
 
 Toby, I think you are right.
 I replaced the mbean configuration to use XADataSourceLoader and minerva (I
 had to patch minerva to support scrollable result sets...), tested the
 server under load and it was MUCH faster.
 I didnt get into details and log/trace files, but the differences in speed
 were visible to the human eye 
 
 
 I'd be very interested to hear of any deeper investigation of this. It
 might be as simple as the Oracle DataSource implementation not doing
 pooling.
 
 Toby.
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Shahar Solomianik

Use RawXADataSource and it works (at least for me)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Taylor
Sent: Saturday, April 07, 2001 11:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


I tend to agree that the JBoss-blocking behavior of incorrectly set up
XADataSources is a bug.  I ran into this too, and judging from the
number of "Oracle pool hanging" messages on this list, a lot of people
are running into it.

I think it happens at the end of the pool creation when
XADataSourceLoader of JBoss does a quick call to check the health of the
Minerva XADataSource.  The health check hangs waiting for a connection
from the source.  If the data source is set up incorrectly in any way,
the pool will never contain a connection to allocate, and the call hangs.

I think a call to an XADataSource.getConnection() should get an
SQLException when the underlying connection factory (in this case, in
the excellent Minerva) gets an SQLException.  My $0.02.

Tim Taylor

Tim Kemp wrote:

 I too have suffered from the Oracle Connection Pool hanging JBoss 2.1 on
 startup.

 By adding the following line to the Datasource mbean (in jboss.jcml), the
 exact error is displayed in the JBoss output.

 attribute name="LoggingEnabled"true/attribute

 In my case it was an incorrect database instance that caused the
connection
 pool to hand

 [OraclePool] Starting
 [OraclePool] XA Connection pool OraclePool bound to java:/OraclePool
 [OraclePool] java.sql.SQLException: Io exception: Connection
 refused(DESCRIPTION

=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)
 )))
 [OraclePool] Pool OraclePool factory
 org.opentools.minerva.jdbc.xa.XAConnectionF
 actory@6ac461 unable to create new object!
 [OraclePool] Pool OraclePool [0/0/10] waiting for a free object  
 Surely this is a problem in JBoss! 

 So the connection pool couldn't connect to Oracle - causing JBoss to hang
 while it was waiting for a free connection, which could never be returned
 cos the connection failed!

 Tim

 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Simphoukham, Southin

Shahar,

How do you do that?

Do you replace org.jboss.jdbc.XADataSourceLoader?

 mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=OracleDB"
attribute name="PoolName"OracleDB/attribute
attribute
name="DataSourceClass"org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l/attribute
attribute name="Properties"/attribute

Southin

-Original Message-
From: Shahar Solomianik [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 6:23 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] Solving Oracle Connection Pool Hanging


Use RawXADataSource and it works (at least for me)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Taylor
Sent: Saturday, April 07, 2001 11:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


I tend to agree that the JBoss-blocking behavior of incorrectly set up
XADataSources is a bug.  I ran into this too, and judging from the
number of "Oracle pool hanging" messages on this list, a lot of people
are running into it.

I think it happens at the end of the pool creation when
XADataSourceLoader of JBoss does a quick call to check the health of the
Minerva XADataSource.  The health check hangs waiting for a connection
from the source.  If the data source is set up incorrectly in any way,
the pool will never contain a connection to allocate, and the call hangs.

I think a call to an XADataSource.getConnection() should get an
SQLException when the underlying connection factory (in this case, in
the excellent Minerva) gets an SQLException.  My $0.02.

Tim Taylor

Tim Kemp wrote:

 I too have suffered from the Oracle Connection Pool hanging JBoss 2.1 on
 startup.

 By adding the following line to the Datasource mbean (in jboss.jcml), the
 exact error is displayed in the JBoss output.

 attribute name="LoggingEnabled"true/attribute

 In my case it was an incorrect database instance that caused the
connection
 pool to hand

 [OraclePool] Starting
 [OraclePool] XA Connection pool OraclePool bound to java:/OraclePool
 [OraclePool] java.sql.SQLException: Io exception: Connection
 refused(DESCRIPTION

=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)
 )))
 [OraclePool] Pool OraclePool factory
 org.opentools.minerva.jdbc.xa.XAConnectionF
 actory@6ac461 unable to create new object!
 [OraclePool] Pool OraclePool [0/0/10] waiting for a free object  
 Surely this is a problem in JBoss! 

 So the connection pool couldn't connect to Oracle - causing JBoss to hang
 while it was waiting for a free connection, which could never be returned
 cos the connection failed!

 Tim

 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Shahar Solomianik

yes.
and use properties attribute instead the standard params, and Oracle XA
instead of minerva...
this is from my jboss.jcml :
  mbean code="org.jboss.jdbc.RawXADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=OraclePool"
attribute name="PoolName"OraclePool/attribute
attribute
name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
attribute
name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
  /mbean

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Simphoukham,
Southin
Sent: Monday, April 09, 2001 2:15 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [JBoss-user] Solving Oracle Connection Pool Hanging



Shahar,

How do you do that?

Do you replace org.jboss.jdbc.XADataSourceLoader?

 mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=OracleDB"
attribute name="PoolName"OracleDB/attribute
attribute
name="DataSourceClass"org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l/attribute
attribute name="Properties"/attribute

Southin

-Original Message-
From: Shahar Solomianik [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 6:23 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] Solving Oracle Connection Pool Hanging


Use RawXADataSource and it works (at least for me)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Taylor
Sent: Saturday, April 07, 2001 11:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


I tend to agree that the JBoss-blocking behavior of incorrectly set up
XADataSources is a bug.  I ran into this too, and judging from the
number of "Oracle pool hanging" messages on this list, a lot of people
are running into it.

I think it happens at the end of the pool creation when
XADataSourceLoader of JBoss does a quick call to check the health of the
Minerva XADataSource.  The health check hangs waiting for a connection
from the source.  If the data source is set up incorrectly in any way,
the pool will never contain a connection to allocate, and the call hangs.

I think a call to an XADataSource.getConnection() should get an
SQLException when the underlying connection factory (in this case, in
the excellent Minerva) gets an SQLException.  My $0.02.

Tim Taylor

Tim Kemp wrote:

 I too have suffered from the Oracle Connection Pool hanging JBoss 2.1 on
 startup.

 By adding the following line to the Datasource mbean (in jboss.jcml), the
 exact error is displayed in the JBoss output.

 attribute name="LoggingEnabled"true/attribute

 In my case it was an incorrect database instance that caused the
connection
 pool to hand

 [OraclePool] Starting
 [OraclePool] XA Connection pool OraclePool bound to java:/OraclePool
 [OraclePool] java.sql.SQLException: Io exception: Connection
 refused(DESCRIPTION

=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)
 )))
 [OraclePool] Pool OraclePool factory
 org.opentools.minerva.jdbc.xa.XAConnectionF
 actory@6ac461 unable to create new object!
 [OraclePool] Pool OraclePool [0/0/10] waiting for a free object  
 Surely this is a problem in JBoss! 

 So the connection pool couldn't connect to Oracle - causing JBoss to hang
 while it was waiting for a free connection, which could never be returned
 cos the connection failed!

 Tim

 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Toby Allsopp

RawXADataSourceLoader is not a replacement for XADataSourceLoader.

The latter binds a DataSource implementation into JNDI which provides
connection pooling. The latter binds an XADataSource in JNDI, which provides
pretty much nothing that application components should be messing with.

How are you using the XADataSource in your code?

Toby.

On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
 yes.
 and use properties attribute instead the standard params, and Oracle XA
 instead of minerva...
 this is from my jboss.jcml :
   mbean code="org.jboss.jdbc.RawXADataSourceLoader"
 name="DefaultDomain:service=XADataSource,name=OraclePool"
 attribute name="PoolName"OraclePool/attribute
 attribute
 name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
 attribute
 name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
   /mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Shahar Solomianik

Well, RawXADataSourceLoader works and XADataSourceLoader doesnt...
doesnt RawXADataSourceLoader pool connections ??? it should be implemented
in the driver.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
Sent: Monday, April 09, 2001 8:47 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


RawXADataSourceLoader is not a replacement for XADataSourceLoader.

The latter binds a DataSource implementation into JNDI which provides
connection pooling. The latter binds an XADataSource in JNDI, which provides
pretty much nothing that application components should be messing with.

How are you using the XADataSource in your code?

Toby.

On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
 yes.
 and use properties attribute instead the standard params, and Oracle XA
 instead of minerva...
 this is from my jboss.jcml :
   mbean code="org.jboss.jdbc.RawXADataSourceLoader"
 name="DefaultDomain:service=XADataSource,name=OraclePool"
 attribute name="PoolName"OraclePool/attribute
 attribute

name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
 attribute
 name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
   /mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Toby Allsopp

On Mon, Apr 09, 2001 at 09:08:31PM +0200, Shahar Solomianik wrote:
 Well, RawXADataSourceLoader works and XADataSourceLoader doesnt...

I think you'll find that "works" is very limited in this case. You won't
get your transactions managed by the container for one thing.

 doesnt RawXADataSourceLoader pool connections ??? it should be implemented
 in the driver.

Why should it be? Connection pooling is a service provided by the app server,
not the JDBC driver. It may well be the case that Oracle's XADataSource
implementation does do pooling, but this doesn't change the fact that your
application component code shouldn't be dealing directly with XADataSource
and XAConnection.

Toby.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
 Sent: Monday, April 09, 2001 8:47 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging
 
 
 RawXADataSourceLoader is not a replacement for XADataSourceLoader.
 
 The latter binds a DataSource implementation into JNDI which provides
 connection pooling. The latter binds an XADataSource in JNDI, which provides
 pretty much nothing that application components should be messing with.
 
 How are you using the XADataSource in your code?
 
 Toby.
 
 On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
  yes.
  and use properties attribute instead the standard params, and Oracle XA
  instead of minerva...
  this is from my jboss.jcml :
mbean code="org.jboss.jdbc.RawXADataSourceLoader"
  name="DefaultDomain:service=XADataSource,name=OraclePool"
  attribute name="PoolName"OraclePool/attribute
  attribute
 
 name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
  attribute
  name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
/mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Shahar Solomianik

Im pretty sure I do get my transactions managed by jboss. are you 100% sure
about that ?

Shahar.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
Sent: Monday, April 09, 2001 9:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


On Mon, Apr 09, 2001 at 09:08:31PM +0200, Shahar Solomianik wrote:
 Well, RawXADataSourceLoader works and XADataSourceLoader doesnt...

I think you'll find that "works" is very limited in this case. You won't
get your transactions managed by the container for one thing.

 doesnt RawXADataSourceLoader pool connections ??? it should be implemented
 in the driver.

Why should it be? Connection pooling is a service provided by the app
server,
not the JDBC driver. It may well be the case that Oracle's XADataSource
implementation does do pooling, but this doesn't change the fact that your
application component code shouldn't be dealing directly with XADataSource
and XAConnection.

Toby.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
 Sent: Monday, April 09, 2001 8:47 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


 RawXADataSourceLoader is not a replacement for XADataSourceLoader.

 The latter binds a DataSource implementation into JNDI which provides
 connection pooling. The latter binds an XADataSource in JNDI, which
provides
 pretty much nothing that application components should be messing with.

 How are you using the XADataSource in your code?

 Toby.

 On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
  yes.
  and use properties attribute instead the standard params, and Oracle XA
  instead of minerva...
  this is from my jboss.jcml :
mbean code="org.jboss.jdbc.RawXADataSourceLoader"
  name="DefaultDomain:service=XADataSource,name=OraclePool"
  attribute name="PoolName"OraclePool/attribute
  attribute
 

name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
  attribute
  name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
/mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Toby Allsopp

On Mon, Apr 09, 2001 at 10:05:43PM +0200, Shahar Solomianik wrote:
 Im pretty sure I do get my transactions managed by jboss. are you 100% sure
 about that ?

I think we should make sure that we're talking about the same thing. Can
you post the code that uses the XADataSource, please?

Toby.

 Shahar.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
 
 On Mon, Apr 09, 2001 at 09:08:31PM +0200, Shahar Solomianik wrote:
  Well, RawXADataSourceLoader works and XADataSourceLoader doesnt...
 
 I think you'll find that "works" is very limited in this case. You won't
 get your transactions managed by the container for one thing.
 
  doesnt RawXADataSourceLoader pool connections ??? it should be implemented
  in the driver.
 
 Why should it be? Connection pooling is a service provided by the app
 server,
 not the JDBC driver. It may well be the case that Oracle's XADataSource
 implementation does do pooling, but this doesn't change the fact that your
 application component code shouldn't be dealing directly with XADataSource
 and XAConnection.
 
 Toby.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
 
  RawXADataSourceLoader is not a replacement for XADataSourceLoader.
 
  The latter binds a DataSource implementation into JNDI which provides
  connection pooling. The latter binds an XADataSource in JNDI, which
 provides
  pretty much nothing that application components should be messing with.
 
  How are you using the XADataSource in your code?
 
  Toby.
 
  On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
   yes.
   and use properties attribute instead the standard params, and Oracle XA
   instead of minerva...
   this is from my jboss.jcml :
 mbean code="org.jboss.jdbc.RawXADataSourceLoader"
   name="DefaultDomain:service=XADataSource,name=OraclePool"
   attribute name="PoolName"OraclePool/attribute
   attribute
 name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
   attribute
   name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
 /mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Shahar Solomianik

Apart from things like that in my code (bmp entities and stateless sessions)
:

  Context ctx = new InitialContext();
  DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/OracleDB");
  conn = ds.getConnection();

  ...
  jdbc bla bla bla
  ...
  conn.close();

I have all my cmp beans using (jboss.xml) :

  resource-ref
res-ref-namejdbc/OracleDB/res-ref-name
resource-nameOralceDB/resource-name
  /resource-ref

resource-manager
  res-nameOracleDB/res-name
  res-jndi-namejava:/OraclePool/res-jndi-name
/resource-manager

while (jboss.jcml):

  mbean code="org.jboss.jdbc.RawXADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=OraclePool"
attribute name="PoolName"OraclePool/attribute
attribute
name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
attribute
name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
  /mbean

Shahar.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
Sent: Monday, April 09, 2001 10:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Solving Oracle Connection Pool Hanging


On Mon, Apr 09, 2001 at 10:05:43PM +0200, Shahar Solomianik wrote:
 Im pretty sure I do get my transactions managed by jboss. are you 100%
sure
 about that ?

I think we should make sure that we're talking about the same thing. Can
you post the code that uses the XADataSource, please?

Toby.

 Shahar.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp

 On Mon, Apr 09, 2001 at 09:08:31PM +0200, Shahar Solomianik wrote:
  Well, RawXADataSourceLoader works and XADataSourceLoader doesnt...

 I think you'll find that "works" is very limited in this case. You won't
 get your transactions managed by the container for one thing.

  doesnt RawXADataSourceLoader pool connections ??? it should be
implemented
  in the driver.

 Why should it be? Connection pooling is a service provided by the app
 server,
 not the JDBC driver. It may well be the case that Oracle's XADataSource
 implementation does do pooling, but this doesn't change the fact that your
 application component code shouldn't be dealing directly with XADataSource
 and XAConnection.

 Toby.

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
 
  RawXADataSourceLoader is not a replacement for XADataSourceLoader.
 
  The latter binds a DataSource implementation into JNDI which provides
  connection pooling. The latter binds an XADataSource in JNDI, which
 provides
  pretty much nothing that application components should be messing with.
 
  How are you using the XADataSource in your code?
 
  Toby.
 
  On Mon, Apr 09, 2001 at 04:48:00PM +0200, Shahar Solomianik wrote:
   yes.
   and use properties attribute instead the standard params, and Oracle
XA
   instead of minerva...
   this is from my jboss.jcml :
 mbean code="org.jboss.jdbc.RawXADataSourceLoader"
   name="DefaultDomain:service=XADataSource,name=OraclePool"
   attribute name="PoolName"OraclePool/attribute
   attribute

name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
   attribute
   name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
 /mbean

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-09 Thread Toby Allsopp

On Mon, Apr 09, 2001 at 11:20:36PM +0200, Shahar Solomianik wrote:
 Apart from things like that in my code (bmp entities and stateless sessions)
 :
 
   Context ctx = new InitialContext();
   DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/OracleDB");
   conn = ds.getConnection();

Hang on. Are you saying that the class oracle.jdbc.xa.client.OracleXADataSource
implements javax.sql.DataSource *and* javax.sql.XADataSource?

Do you have documentation on what this class actually implements?

It looks like Oracle's JDBC driver is doing some of the stuff that I said
it wouldn't. If this is working properly, then you need to be aware that
this is not in any way portable.

I still don't believe that transactions will work correctly, because the
JDBC driver doesn't have a hook into JBoss's transaction manager. Be
very, very careful before you decide it's working. I'd be interested to see
some debugging output from the transaction manager if you decide this is
working (set trace to true in TxCapsule or something, I think).

Toby.

   mbean code="org.jboss.jdbc.RawXADataSourceLoader"
 name="DefaultDomain:service=XADataSource,name=OraclePool"
 attribute name="PoolName"OraclePool/attribute
 attribute
 name="DataSourceClass"oracle.jdbc.xa.client.OracleXADataSource/attribute
 attribute
 name="Properties"URL=jdbc:oracle:oci8:scott/tiger@orcl/attribute
   /mbean
 
 Shahar.

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Solving Oracle Connection Pool Hanging

2001-04-05 Thread Tim Kemp

I too have suffered from the Oracle Connection Pool hanging JBoss 2.1 on
startup.

By adding the following line to the Datasource mbean (in jboss.jcml), the
exact error is displayed in the JBoss output.

attribute name="LoggingEnabled"true/attribute

In my case it was an incorrect database instance that caused the connection
pool to hand

[OraclePool] Starting
[OraclePool] XA Connection pool OraclePool bound to java:/OraclePool
[OraclePool] java.sql.SQLException: Io exception: Connection
refused(DESCRIPTION
=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)
)))
[OraclePool] Pool OraclePool factory
org.opentools.minerva.jdbc.xa.XAConnectionF
actory@6ac461 unable to create new object!
[OraclePool] Pool OraclePool [0/0/10] waiting for a free object  
Surely this is a problem in JBoss! 

So the connection pool couldn't connect to Oracle - causing JBoss to hang
while it was waiting for a free connection, which could never be returned
cos the connection failed!

Tim

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user