You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Kees de Kooter (JIRA)" <ji...@apache.org> on 2006/07/13 17:00:29 UTC
[jira] Created: (DBCP-194) BasicDataSource.setLogWriter should not
do createDataSource
BasicDataSource.setLogWriter should not do createDataSource
-----------------------------------------------------------
Key: DBCP-194
URL: http://issues.apache.org/jira/browse/DBCP-194
Project: Commons Dbcp
Type: Bug
Versions: 1.2 Final
Reporter: Kees de Kooter
The code for setLogWriter is:
public void setLogWriter(PrintWriter logWriter) throws SQLException {
createDataSource().setLogWriter(logWriter);
this.logWriter = logWriter;
}
This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (DBCP-194) BasicDataSource.setLogWriter should
not do createDataSource
Posted by "Kees de Kooter (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DBCP-194?page=comments#action_12453942 ]
Kees de Kooter commented on DBCP-194:
-------------------------------------
Unfortunately this does not solve my problem. I want to get rid of the text "AbandonedObjectPool is used" that is printed to stdout each time I start the pool.
The root cause is in AbandonedObjectPool itself, in the constructor:
System.out.println("AbandonedObjectPool is used (" + this + ")");
System.out.println(" LogAbandoned: " + config.getLogAbandoned());
System.out.println(" RemoveAbandoned: " + config.getRemoveAbandoned());
System.out.println(" RemoveAbandonedTimeout: " + config.getRemoveAbandonedTimeout());
This should at least be written to a configurable (Print)Writer. And preferably to a configurable logger of course.
> BasicDataSource.setLogWriter should not do createDataSource
> -----------------------------------------------------------
>
> Key: DBCP-194
> URL: http://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Kees de Kooter
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
> I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (DBCP-194) BasicDataSource.setLogWriter should not
do createDataSource
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DBCP-194?page=all ]
Phil Steitz updated DBCP-194:
-----------------------------
Fix Version/s: 1.3
This will be part of the logging cleanup in 1.3
> BasicDataSource.setLogWriter should not do createDataSource
> -----------------------------------------------------------
>
> Key: DBCP-194
> URL: http://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Kees de Kooter
> Fix For: 1.3
>
> Attachments: AbandonedObjectPool.patch
>
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
> I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (DBCP-194) BasicDataSource.setLogWriter should not
do createDataSource
Posted by "Kees de Kooter (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DBCP-194?page=all ]
Kees de Kooter updated DBCP-194:
--------------------------------
Attachment: AbandonedObjectPool.patch
Patched AbandonedObjectPool
> BasicDataSource.setLogWriter should not do createDataSource
> -----------------------------------------------------------
>
> Key: DBCP-194
> URL: http://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Kees de Kooter
> Attachments: AbandonedObjectPool.patch
>
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
> I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Closed: (DBCP-194) BasicDataSource.setLogWriter should not
do createDataSource
Posted by "Dain Sundstrom (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DBCP-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dain Sundstrom closed DBCP-194.
-------------------------------
Resolution: Fixed
Fixed some time ago.
> BasicDataSource.setLogWriter should not do createDataSource
> -----------------------------------------------------------
>
> Key: DBCP-194
> URL: https://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Kees de Kooter
> Fix For: 1.3
>
> Attachments: AbandonedObjectPool.patch
>
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
> I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (DBCP-194) BasicDataSource.setLogWriter should
not do createDataSource
Posted by "Kees de Kooter (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DBCP-194?page=comments#action_12453946 ]
Kees de Kooter commented on DBCP-194:
-------------------------------------
System.out is also used in AbandonedTrace
> BasicDataSource.setLogWriter should not do createDataSource
> -----------------------------------------------------------
>
> Key: DBCP-194
> URL: http://issues.apache.org/jira/browse/DBCP-194
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Kees de Kooter
>
> The code for setLogWriter is:
> public void setLogWriter(PrintWriter logWriter) throws SQLException {
> createDataSource().setLogWriter(logWriter);
> this.logWriter = logWriter;
> }
> This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.
> I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org