I see.  Okay, I changed it so that it won't automatically close
the connection.  You can use the "invalidateOnError" setting to control
whether connections should be kept in the pool or released after a
SQLException, but it won't automatically close the connection in either
case - it'll wait until you call close on it.  You can get the update from
CVS.

Aaron

On Wed, 15 Nov 2000, Bill Pfeiffer wrote:
> Aaron,
>
> I believe I see what the problem is.  I am using the jdbc-odbc bridge to
> talk to MS SQL Server.  This works fine except for one LITTLE quirk on
> columns with a text datatype.  When a getString is performed on result set
> of these columns, an innocuous exception is thrown (no message, null
> values), which I catch, test, and then safely ignore.
>
> Minerva, however, catches it, shuts down the connection and bubbles up the
> exception.  It did not used to close the connection.
>
> Anything I can do about this other than actually purchase a real driver (or
> continue to use the old jboss.jar)?
>
>
> Thanks for you response,
>
> Bill Pfeiffer
>
> ---------------------
>
> Here is the stack snapshot of where the object connection is closed, only
> the first 8 or so lines are relevant.  The ResultSetInPool.getString() is
> where the orginating expeption occurs:
>
> org.jboss.minerva.pools.ObjectPool.objectError (ObjectPool.java:706)
> org.jboss.minerva.jdbc.ConnectionInPool.firePoolEvent
> (ConnectionInPool.java:161)
> org.jboss.minerva.jdbc.ConnectionInPool.setError (ConnectionInPool.java:98)
> org.jboss.minerva.jdbc.StatementInPool.setError (StatementInPool.java:50)
> org.jboss.minerva.jdbc.ResultSetInPool.setError (ResultSetInPool.java:54)
> org.jboss.minerva.jdbc.ResultSetInPool.getString (ResultSetInPool.java:669)
> com.pdma.oasis.beans.TestDataBean.getSampleCols (TestDataBean.java:190)
> com.pdma.oasis.beans.TestDataBean.getData (TestDataBean.java:143)
> com.pdma.oasis.beans.GenericBean.init (GenericBean.java:26)
> com.pdma.oasis.beans.GenericBean.init (GenericBean.java:15)
> jsp._0002fjsp_0002fPointComments_0002ejspPointComments_jsp_0._jspService
> (_0002fjsp_0002fPointComments_0002ejspPointComments_jsp_0.java:173)
> org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:119)
> javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
> (JspServlet.java:177)
> org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:318)
> org.apache.jasper.servlet.JspServlet.service (JspServlet.java:391)
> javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
> org.apache.tomcat.core.ServletWrapper.doService (ServletWrapper.java:404)
> org.apache.tomcat.core.Handler.service (Handler.java:286)
> org.apache.tomcat.core.ServletWrapper.service (ServletWrapper.java:372)
> org.apache.tomcat.facade.RequestDispatcherImpl.forward
> (RequestDispatcherImpl.java:194)
> com.pdma.oasis.servlets.OasisCommandServlet.service
> (OasisCommandServlet.java:56)
> javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
> org.apache.tomcat.core.ServletWrapper.doService (ServletWrapper.java:404)
> org.apache.tomcat.core.Handler.service (Handler.java:286)
> org.apache.tomcat.core.ServletWrapper.service (ServletWrapper.java:372)
> org.apache.tomcat.core.ContextManager.internalService
> (ContextManager.java:799)
> org.apache.tomcat.core.ContextManager.service (ContextManager.java:745)
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
> (HttpConnectionHandler.java:210)
> org.apache.tomcat.service.TcpWorkerThread.runIt (PoolTcpEndpoint.java:407)
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run (ThreadPool.java:498)
> java.lang.Thread.run (Thread.java:484)
>
>
> ----- Original Message -----
> From: "Aaron Mulder" <[EMAIL PROTECTED]>
> To: "jBoss" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 14, 2000 1:19 PM
> Subject: Re: [jBoss-User] Minerva JDBCPoolDataSource
>
>
> > Use the source, Luke!
> >
> > I know Marc and Rickard made some changes so that Minerva would
> > use the jBoss logger - perhaps this is causing the problem as it may
> > generate exceptions if run outside?
> > Anyway, what I suggest you do is put a
> > Thread.currentThread().dumpStack() in
> > org.jboss.minerva.factories.JDBCConnectionFactory.deleteObject so you can
> > see if the connections are really being permanently closed.  If that
> > doesn't get hit, then you just have a bad wrapper (the real connection is
> > still open, but the wrapper around that is not getting recycled) and we'll
> > pursue that separately.
> > FYI, I'm planning to put together a separate Minerva JAR with all
> > the jBoss dependencies removed in the next week or so.
> >
> > Aaron
> >
> > On Tue, 14 Nov 2000, Bill Pfeiffer wrote:
> > > I have used the Minerva classes (jboss.jar) to do connection pooling
> > > in my Tomcat app, outside of the scope of jBoss.  As of jBoss pr3, I
> > > was able to create a JDBCPoolDataSource, get connections from it, use
> > > and then close the connections.  All was well.
> > >
> > > As of the jBoss pr4 and on up, the connections seem to be handed off
> > > from JDBCPoolDataSource as closed.  IOW, when I get a connection from
> > > JDBCPoolDataSource, the connection is closed and any attempt to use
> > > the connection throws an exception.
> > >
> > > I am just doing a normal close on the connection.  My assumption was
> > > that this just returned the connection to the pool.  Is this not what
> > > is happening?  How should I release a connection obtained by
> > > JDBCPoolDataSource?
> > >
> > > Note that I am not actually running jboss in this scenario, just using
> > > the Minerva classes from the jboss.jar.
> > >
> > > TIA for any help,
> > >
> > > Bill Pfeiffer
> > >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to