[
http://jira.jboss.com/jira/browse/JBAS-5303?page=all ]
Adrian Brock closed JBAS-5303.
------------------------------
Resolution: Rejected
There never was a 4.0.5.SP1 release, so I don't why you are raising bug reports
against it?
Anyway this isn't a bug.
This is a message you get when you use
<track-statements>true</track-statements>
the default is (and has been for a long time)
<track-statements>nowarn</track-statements>
Code from 4.0.5.GA WrappedStatement
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/tags/JBoss_4_0_5_GA/co...
// i.e. ps.close()
public void close() throws SQLException
{
synchronized (lock)
{
if (closed)
return;
closed = true;
}
lc.unregisterStatement(this);
internalClose();
}
// closes the result sets
protected void internalClose() throws SQLException
{
synchronized (lock)
{
closed = true;
}
try
{
closeResultSets();
}
finally
{
s.close();
}
}
protected void closeResultSets()
{
// Doesn't do anything if <track-statements>false</track-statements>
if (lc.getTrackStatements() ==
BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_FALSE_INT)
return;
synchronized (this)
{
if (resultSets == null)
return;
for (Iterator i = resultSets.entrySet().iterator(); i.hasNext();)
{
Map.Entry entry = (Map.Entry) i.next();
WrappedResultSet resultSet = (WrappedResultSet) entry.getKey();
// But warns you if you have <track-statements>true</track-statements>
if (lc.getTrackStatements() ==
BaseWrapperManagedConnectionFactory.TRACK_STATEMENTS_TRUE_INT)
{
Throwable stackTrace = (Throwable) entry.getValue();
lc.getLogger().warn("Closing a result set you left open! Please close
it yourself.", stackTrace);
}
try
{
resultSet.internalClose();
}
catch (Throwable t)
{
lc.getLogger().warn("Error closing a result set you left open! Please
close it yourself.", t);
}
}
resultSets.clear();
}
}
JBoss doesn't recognize closing ResultSet by PreparedStatement
close() method
-----------------------------------------------------------------------------
Key: JBAS-5303
URL:
http://jira.jboss.com/jira/browse/JBAS-5303
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA service
Affects Versions: JBossAS-4.0.5.SP1
Environment: Linux; jre 1.5.012
Reporter: Evanildo Batista
In a database query, after ps.executeQuery(), when the PreparedStatement close() is
declared before ResultSet close() the ps.close() closes de ResultSet.
( "... A ResultSet object is automatically closed when the Statement object that
generated it is closed" - ResultSet API doc )
But, when this occur Jboss AS doesn't recognize the close in the ResultSet and shows
this log:
# WARN[20 Feb 2008 08:01:00,107] - Closing a result set you left open! Please close it
yourself.
# java.lang.Throwable: STACKTRACE
# at java.lang.Throwable.<init>(Throwable.java:56)
# at java.lang.Throwable.<init>(Throwable.java:67)
# at
org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:617)
# at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:237)
# at dao.ProdDAO.getIdProd(ProdDAO.java:1504)
# at dao.ProdDAO.getListaProd(ProdDAO.java:73)
# at dao.ProdDAO.getListaProd(ProdDAO.java:1015)
# at action.ProdAction.buscarProd(ProdAction.java:1032)
# at action.ProdAction.buscarProdutos(ProdAction.java:1082)
# at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
# at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
# at java.lang.reflect.Method.invoke(Method.java:615)
# at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
# at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
# at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
# at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
# at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
# at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
# at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
# at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
# at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
# at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
# at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
# at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
# at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
# at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
# at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
# at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
# at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
# at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
# at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
# at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
# at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
# at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
# at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
# at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
# at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira