Well, you haven't told us what the actual problem you are having is. I
doubt it is that jboss logging isn't working properly;-) Have you verified
that there are different numbers of takes and puts for the pool? (not that
every close is followed by a put). Does this occur only under high
continuous load? If so I recommend you try the ConnectionFactoryLoader
type setup from cvs.
david jencks
On 2001.11.21 08:22:41 -0500 Edson Carlos Ericksson Richter wrote:
> So I'm getting a crazy operational failure due to connection does not
> returning to spool...
>
> I figured out that setting appropriate values in the JCML I can get
> connection to the pool again... But imagine a high demand use (lets say,
> 200
> users)... What will be happenning? My app is not a "book sales", where
> the
> user stops, think, then buy... It's a full time user intensive with high
> volume HTML generation...
>
> Why calling close does not really close connection? Even when we already
> have
> executed all methods that go inside transactions (and even if I configure
> the
> methods to not use transactions)...
>
>
> Edson Richter
>
>
> ----- Original Message -----
> From: "David Jencks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 20, 2001 11:04 AM
> Subject: Re: [JBoss-user] JDBC Pool - Getting in trouble
>
>
> > JBoss is logging every message.
> >
> > I am arguing by analogy from the ConnectionManager treatment of this
> > problem, I think it works the same way for XADataSourceLoader etc.
> >
> > Unless you are using the xa features of an xa driver, a connection will
> be
> > taken from the pool for the first connection needed in a transaction,
> and
> > it will be kept around until the transaction has committed, then it
> will
> be
> > returned to the pool. So if there are 2 chunks of work in a
> transaction,
> > you will only see one checkout and one checkin logged.
> >
> > btw I made a mistake, you are correct, in [x/y/z]
> > x = number in use (NOT number free)
> > y = number existing
> > z = max
> >
> > david jencks
> >
> > On 2001.11.20 08:16:42 -0500 Edson Carlos Ericksson Richter wrote:
> > > With logging enabled, for every connection I open I should get "gave
> out
> > > pooled object". For every close I should get "returned object".
> > > But, as I can see, JBoss does not log every message. Appear that he
> does
> > > only when he get time to do. I have several datasource.getConnection
> that
> > > does not give me "gave out" and several close that does not give me
> > > "returned object". How can I force every message for debbuging poll?
> > >
> > > I've tryied to debug JBoss, but this is so hard to me...
> > >
> > >
> > > Thanks.
> > >
> > > Edson Richter
> > >
> > > ----- Original Message -----
> > > From: "Edson Carlos Ericksson Richter" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 20, 2001 8:09 AM
> > > Subject: Re: [JBoss-user] JDBC Pool - Getting in trouble
> > >
> > >
> > > > I've configured this method for not using transaction, but nothing
> > > > happens... Connection still getting locked.
> > > > More info: I'm using JBoss 2.4.3, Tomcat 4.01, JConnect 5.5 and
> Sybase
> > > > 11.9.2 (NT, without fixes).
> > > > Configuring idletimeout does not release connections (so appear
> that
> > > locked
> > > > connections are not idle - and they are - I have closed them) ...
> > > >
> > > > If anyone has experienced this kind of trouble, any tips will be
> > > welcome.
> > > >
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > Edson Richter
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Edson Carlos Ericksson Richter" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 19, 2001 6:38 PM
> > > > Subject: Re: [JBoss-user] JDBC Pool - Getting in trouble
> > > >
> > > >
> > > > > I'm getting in trouble with JDBC Pool.
> > > > > After all use of a connection, I close resultSet, I close the
> > > statement
> > > > and
> > > > > then close Connection.
> > > > > After all closes I get "returned object", except in one case. If
> > > anyone
> > > > can
> > > > > analyse this code and give some idea, please do:
> > > > >
> > > > > public List getAll() throws RemoteException {
> > > > > ArrayList lista = null;
> > > > > Connection connection = null;
> > > > > Statement statement = null;
> > > > > ResultSet resultSet = null;
> > > > > MyObject tipo = null;
> > > > >
> > > > > try {
> > > > > StringBuffer sql = new StringBuffer( "select co_tipo,
> > > ds_tipo
> > > > > from tipo order by co_tipo" );
> > > > > connection = this._getConnection( ); // this method
> > > returns
> > > > one
> > > > > connection from the pool.
> > > > >
> > > > > statement = connection.createStatement( );
> > > > > resultSet = statement.executeQuery( sql.toString( )
> );
> > > > > tipo = null;
> > > > >
> > > > > lista = new ArrayList( );
> > > > >
> > > > > while( resultSet.next( ) ) {
> > > > > try {
> > > > > tipo = new MyObject( );
> > > > > tipo.codigo = resultSet.getInt( 1 );
> > > > > tipo.descricao = resultSet.getString( 2 );
> > > > > } catch( Exception e ) {
> > > > > e.printStackTrace( );
> > > > > }
> > > > >
> > > > > lista.add( tipo );
> > > > > }
> > > > > } catch( Exception e ) {
> > > > > e.printStackTrace();
> > > > > lista = null;
> > > > > } finally {
> > > > > this._close( connection, statement, resultSet );
> //this
> > > method
> > > > > closes, in order, ResultSet, Statement and then Connection
> > > > > }
> > > > >
> > > > > return lista;
> > > > > }
> > > > >
> > > > > private void _close( Connection connection, Statement
> statement,
> > > > > ResultSet resultSet ) {
> > > > > if( _DEBUG )
> > > > > System.out.println("_close( Connection, Statement,
> > > ResultSet )" );
> > > > >
> > > > > if( resultSet != null ) {
> > > > > try {
> > > > > resultSet.close( );
> > > > > } catch( Exception e ) {
> > > > > e.printStackTrace( );
> > > > > }
> > > > > }
> > > > >
> > > > > if( statement != null ) {
> > > > > try {
> > > > > statement.close( );
> > > > > } catch( Exception e ) {
> > > > > e.printStackTrace( );
> > > > > }
> > > > > }
> > > > >
> > > > > if( connection != null ) {
> > > > > try {
> > > > > connection.close( );
> > > > > } catch( Exception e ) {
> > > > > e.printStackTrace( );
> > > > > }
> > > > > }
> > > > > }
> > > > >
> > > > > private Connection _getConnection( ) {
> > > > >
> > > > > DataSource dataSource = null;
> > > > > Connection connection = null;
> > > > >
> > > > > try {
> > > > > javax.naming.Context context = new
> > > > > javax.naming.InitialContext( );
> > > > >
> > > > > try {
> > > > > dataSource = ( DataSource )context.lookup(
> > > > > "java:/jdbc/myDB" );
> > > > > } catch( Exception e2 ) {
> > > > > e2.printStackTrace();
> > > > > throw new EJBException( "Erro buscando o
> DataSource:
> > > " +
> > > > > e2.toString( ) );
> > > > > }
> > > > >
> > > > > try {
> > > > > connection = dataSource.getConnection( );
> > > > > } catch( Exception e2 ) {
> > > > > e2.printStackTrace();
> > > > > throw new EJBException( "Erro buscando
> Connection: "
> > > +
> > > > > e2.toString( ) );
> > > > > }
> > > > >
> > > > > } catch( Exception e1 ) {
> > > > > e1.printStackTrace();
> > > > > throw new EJBException( "N�o foi poss�vel obter o
> > > \"Initial
> > > > > Context\": " + e1.toString( ) );
> > > > > }
> > > > >
> > > > > return connection;
> > > > > }
> > > > >
> > > > >
> > > > > I have several other methods that works exactly same way, but
> they
> > > closes
> > > > > connection when I call _close in finally clause...
> > > > > Maybe this a JDBC Pool bug? Setting connection time out in JCML
> > > > > configuration file does not release connection nevermore...
> > > > >
> > > > > Anyone can give a light?
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > >
> > > > > Edson Richter
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "David Jencks" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Monday, November 19, 2001 4:55 PM
> > > > > Subject: Re: [JBoss-user] JDBC Pool
> > > > >
> > > > >
> > > > > > On 2001.11.19 14:34:06 -0500 Edson Carlos Ericksson Richter
> wrote:
> > > > > > > what means numbers 0, 2 and 10 in
> > > > > > >
> > > > > > > [jdbc/myConnection] Pool jdbc/myConnection [0/2/10] returned
> > > object
> > > > > > > org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@7ec028 to the
> > > pool.
> > > > > > >
> > > > > > > log message?
> > > > > >
> > > > > > In the pool, there are 0 free connections, 2 are created (and,
> > > noticing
> > > > > the
> > > > > > 0, in use), and the max capacity is 10.
> > > > > > david jencks
> > > > > > >
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > >
> > > > > > > Edson Richter
> > > > > > >
> > > > > > >
> > > > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">
> > > > > > > <HTML><HEAD>
> > > > > > > <META http-equiv=Content-Type content="text/html;
> > > charset=iso-8859-1">
> > > > > > > <META content="MSHTML 6.00.2600.0" name=GENERATOR>
> > > > > > > <STYLE></STYLE>
> > > > > > > </HEAD>
> > > > > > > <BODY bgColor=#ffffff>
> > > > > > > <DIV><FONT face=Arial size=2>what means numbers 0, 2 and
> > > > > > > 10 in</FONT></DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2>[jdbc/myConnection] Pool
> > > > jdbc/myConnection
> > > > > > > [0/2/10]
> > > > > > > returned object org.jboss.pool.jdb<A
> > > > > > >
> > > > >
> > > >
> > >
> href="mailto:org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@7ec028">c.xa.wr
> > > > > apper.XAConnectionImpl@7ec028</A>
> > > > > > >
> > > > > > > to the pool.</FONT></DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2>log message?</FONT></DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2></FONT> </DIV>
> > > > > > > <DIV><FONT face=Arial size=2>Edson Richter</FONT></DIV>
> > > > > > > <DIV> </DIV></BODY></HTML>
> > > > > > >
> > > > > > > BEGIN:VCARD
> > > > > > > VERSION:2.1
> > > > > > > N:Richter;Edson;Carlos Ericksson
> > > > > > > FN:Edson Carlos Ericksson Richter
> > > > > > > NICKNAME:Richter
> > > > > > > ORG:ECONET Solu��es Web;Sistemas Corporativos
> > > > > > > TITLE:Gerente de Projetos
> > > > > > > TEL;WORK;VOICE:61 3265115
> > > > > > > ADR;WORK:;;Liberty Mall, Torre B, Sala
> > > > 1011;Bras�lia;DF;70000-000;Brasil
> > > > > > > LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Liberty Mall, Torre B,
> Sala
> > > > > > > 1011=0D=0ABras=EDlia, DF 70000-000=0D=0ABrasil
> > > > > > > URL;WORK:http://www.carabrasilia.com.br
> > > > > > > EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
> > > > > > > EMAIL;INTERNET:[EMAIL PROTECTED]
> > > > > > > EMAIL;INTERNET:[EMAIL PROTECTED]
> > > > > > > REV:20011119T193406Z
> > > > > > > END:VCARD
> > > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > JBoss-user mailing list
> > > > > > [EMAIL PROTECTED]
> > > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > JBoss-user mailing list
> > > > > [EMAIL PROTECTED]
> > > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > JBoss-user mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > > >
> > >
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user