You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2009/03/23 13:07:38 UTC

svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Author: fhanik
Date: Mon Mar 23 12:07:36 2009
New Revision: 757381

URL: http://svn.apache.org/viewvc?rev=757381&view=rev
Log:
expose the poolname through a public method, this will allow one to retrieve the actual connection pool through JMX as well

Modified:
    tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java Mon Mar 23 12:07:36 2009
@@ -44,10 +44,6 @@
     
     protected volatile ConnectionPool pool = null;
     
-    public ConnectionPool getPool() {
-        return pool;
-    }
-
     protected PoolProperties poolProperties = new PoolProperties();
 
     public DataSourceProxy() {
@@ -125,6 +121,14 @@
                                                 String password) throws SQLException {
         return (PooledConnection) getConnection();
     }
+    
+    public ConnectionPool getPool() {
+        return pool;
+    }
+
+    public String getPoolName() {
+        return pool.getName();
+    }
 
     /**
      * {@inheritDoc}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Posted by sebb <se...@gmail.com>.
On 23/03/2009, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> sebb wrote:
>
> > Since it's a new variable,
> >
>  define new

Has pool been released yet?

>
> > one can make it private now without
> > breaking anything.
> >
> > Every little helps.
> >
> > On 23/03/2009, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> >
> >
> > > one could also make a toilet made out of solid gold, but it's just not
> in
> > > the cards now is it?
> > >  http://www.imdb.com/character/ch0002425/quotes
> > >
> > >
> > >
> > >
> > >  sebb wrote:
> > >
> > >
> > >
> > > > On 23/03/2009, fhanik@apache.org <fh...@apache.org> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > > Author: fhanik
> > > > >  Date: Mon Mar 23 12:07:36 2009
> > > > >  New Revision: 757381
> > > > >
> > > > >  URL:
> http://svn.apache.org/viewvc?rev=757381&view=rev
> > > > >  Log:
> > > > >  expose the poolname through a public method, this will allow one to
> > > > >
> > > > >
> > > >
> > > retrieve the actual connection pool through JMX as well
> > >
> > >
> > > >
> > > > >  Modified:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > >
> > >
> > > >
> > > > >  Modified:
> > > > >
> > > > >
> > > >
> > >
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > >
> > >
> > > >
> > > > >  URL:
> > > > >
> > > > >
> > > >
> > >
> http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
> > >
> ==============================================================================
> > >
> > >
> > > >
> > > > >  ---
> > > > >
> > > > >
> > > >
> > >
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > > (original)
> > >
> > >
> > > >
> > > > >  +++
> > > > >
> > > > >
> > > >
> > >
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > > Mon Mar 23 12:07:36 2009
> > >
> > >
> > > >
> > > > >  @@ -44,10 +44,6 @@
> > > > >
> > > > >    protected volatile ConnectionPool pool = null;
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > Since getPool() is public, one could make the variable private.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > >  -    public ConnectionPool getPool() {
> > > > >  -        return pool;
> > > > >  -    }
> > > > >  -
> > > > >    protected PoolProperties poolProperties = new PoolProperties();
> > > > >
> > > > >    public DataSourceProxy() {
> > > > >  @@ -125,6 +121,14 @@
> > > > >                                                String password)
> throws
> > > > >
> > > > >
> > > >
> > > SQLException {
> > >
> > >
> > > >
> > > > >        return (PooledConnection) getConnection();
> > > > >    }
> > > > >  +
> > > > >  +    public ConnectionPool getPool() {
> > > > >  +        return pool;
> > > > >  +    }
> > > > >  +
> > > > >  +    public String getPoolName() {
> > > > >  +        return pool.getName();
> > > > >  +    }
> > > > >
> > > > >    /**
> > > > >     * {@inheritDoc}
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > >
> > >
> > > >
> > > > >  To unsubscribe, e-mail:
> > > > >
> > > > >
> > > >
> > > dev-unsubscribe@tomcat.apache.org
> > >
> > >
> > > >
> > > > >  For additional commands, e-mail: dev-help@tomcat.apache.org
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > >
> > >
> > > > To unsubscribe, e-mail:
> dev-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: dev-help@tomcat.apache.org
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > >  To unsubscribe, e-mail:
> dev-unsubscribe@tomcat.apache.org
> > >  For additional commands, e-mail: dev-help@tomcat.apache.org
> > >
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: dev-help@tomcat.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
sebb wrote:
> Since it's a new variable, 
define new
> one can make it private now without
> breaking anything.
>
> Every little helps.
>
> On 23/03/2009, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>   
>> one could also make a toilet made out of solid gold, but it's just not in
>> the cards now is it?
>>  http://www.imdb.com/character/ch0002425/quotes
>>
>>
>>
>>
>>  sebb wrote:
>>
>>     
>>> On 23/03/2009, fhanik@apache.org <fh...@apache.org> wrote:
>>>
>>>
>>>       
>>>> Author: fhanik
>>>>  Date: Mon Mar 23 12:07:36 2009
>>>>  New Revision: 757381
>>>>
>>>>  URL: http://svn.apache.org/viewvc?rev=757381&view=rev
>>>>  Log:
>>>>  expose the poolname through a public method, this will allow one to
>>>>         
>> retrieve the actual connection pool through JMX as well
>>     
>>>>  Modified:
>>>>
>>>>         
>> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>>     
>>>>  Modified:
>>>>         
>> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>>     
>>>>  URL:
>>>>         
>> http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
>>     
>> ==============================================================================
>>     
>>>>  ---
>>>>         
>> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>> (original)
>>     
>>>>  +++
>>>>         
>> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>> Mon Mar 23 12:07:36 2009
>>     
>>>>  @@ -44,10 +44,6 @@
>>>>
>>>>     protected volatile ConnectionPool pool = null;
>>>>
>>>>
>>>>
>>>>         
>>> Since getPool() is public, one could make the variable private.
>>>
>>>
>>>
>>>       
>>>>  -    public ConnectionPool getPool() {
>>>>  -        return pool;
>>>>  -    }
>>>>  -
>>>>     protected PoolProperties poolProperties = new PoolProperties();
>>>>
>>>>     public DataSourceProxy() {
>>>>  @@ -125,6 +121,14 @@
>>>>                                                 String password) throws
>>>>         
>> SQLException {
>>     
>>>>         return (PooledConnection) getConnection();
>>>>     }
>>>>  +
>>>>  +    public ConnectionPool getPool() {
>>>>  +        return pool;
>>>>  +    }
>>>>  +
>>>>  +    public String getPoolName() {
>>>>  +        return pool.getName();
>>>>  +    }
>>>>
>>>>     /**
>>>>      * {@inheritDoc}
>>>>
>>>>
>>>>
>>>>
>>>>         
>> ---------------------------------------------------------------------
>>     
>>>>  To unsubscribe, e-mail:
>>>>         
>> dev-unsubscribe@tomcat.apache.org
>>     
>>>>  For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>  For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Posted by sebb <se...@gmail.com>.
Since it's a new variable, one can make it private now without
breaking anything.

Every little helps.

On 23/03/2009, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> one could also make a toilet made out of solid gold, but it's just not in
> the cards now is it?
>  http://www.imdb.com/character/ch0002425/quotes
>
>
>
>
>  sebb wrote:
>
> > On 23/03/2009, fhanik@apache.org <fh...@apache.org> wrote:
> >
> >
> > > Author: fhanik
> > >  Date: Mon Mar 23 12:07:36 2009
> > >  New Revision: 757381
> > >
> > >  URL: http://svn.apache.org/viewvc?rev=757381&view=rev
> > >  Log:
> > >  expose the poolname through a public method, this will allow one to
> retrieve the actual connection pool through JMX as well
> > >
> > >  Modified:
> > >
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > >
> > >  Modified:
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> > >  URL:
> http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
> > >
> ==============================================================================
> > >  ---
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> (original)
> > >  +++
> tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
> Mon Mar 23 12:07:36 2009
> > >  @@ -44,10 +44,6 @@
> > >
> > >     protected volatile ConnectionPool pool = null;
> > >
> > >
> > >
> >
> > Since getPool() is public, one could make the variable private.
> >
> >
> >
> > >  -    public ConnectionPool getPool() {
> > >  -        return pool;
> > >  -    }
> > >  -
> > >     protected PoolProperties poolProperties = new PoolProperties();
> > >
> > >     public DataSourceProxy() {
> > >  @@ -125,6 +121,14 @@
> > >                                                 String password) throws
> SQLException {
> > >         return (PooledConnection) getConnection();
> > >     }
> > >  +
> > >  +    public ConnectionPool getPool() {
> > >  +        return pool;
> > >  +    }
> > >  +
> > >  +    public String getPoolName() {
> > >  +        return pool.getName();
> > >  +    }
> > >
> > >     /**
> > >      * {@inheritDoc}
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > >  To unsubscribe, e-mail:
> dev-unsubscribe@tomcat.apache.org
> > >  For additional commands, e-mail: dev-help@tomcat.apache.org
> > >
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: dev-help@tomcat.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
one could also make a toilet made out of solid gold, but it's just not 
in the cards now is it?
http://www.imdb.com/character/ch0002425/quotes



sebb wrote:
> On 23/03/2009, fhanik@apache.org <fh...@apache.org> wrote:
>   
>> Author: fhanik
>>  Date: Mon Mar 23 12:07:36 2009
>>  New Revision: 757381
>>
>>  URL: http://svn.apache.org/viewvc?rev=757381&view=rev
>>  Log:
>>  expose the poolname through a public method, this will allow one to retrieve the actual connection pool through JMX as well
>>
>>  Modified:
>>     tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>>
>>  Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>>  URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
>>  ==============================================================================
>>  --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original)
>>  +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java Mon Mar 23 12:07:36 2009
>>  @@ -44,10 +44,6 @@
>>
>>      protected volatile ConnectionPool pool = null;
>>
>>     
>
> Since getPool() is public, one could make the variable private.
>
>   
>>  -    public ConnectionPool getPool() {
>>  -        return pool;
>>  -    }
>>  -
>>      protected PoolProperties poolProperties = new PoolProperties();
>>
>>      public DataSourceProxy() {
>>  @@ -125,6 +121,14 @@
>>                                                  String password) throws SQLException {
>>          return (PooledConnection) getConnection();
>>      }
>>  +
>>  +    public ConnectionPool getPool() {
>>  +        return pool;
>>  +    }
>>  +
>>  +    public String getPoolName() {
>>  +        return pool.getName();
>>  +    }
>>
>>      /**
>>       * {@inheritDoc}
>>
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>  For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r757381 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

Posted by sebb <se...@gmail.com>.
On 23/03/2009, fhanik@apache.org <fh...@apache.org> wrote:
> Author: fhanik
>  Date: Mon Mar 23 12:07:36 2009
>  New Revision: 757381
>
>  URL: http://svn.apache.org/viewvc?rev=757381&view=rev
>  Log:
>  expose the poolname through a public method, this will allow one to retrieve the actual connection pool through JMX as well
>
>  Modified:
>     tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>
>  Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
>  URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=757381&r1=757380&r2=757381&view=diff
>  ==============================================================================
>  --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original)
>  +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java Mon Mar 23 12:07:36 2009
>  @@ -44,10 +44,6 @@
>
>      protected volatile ConnectionPool pool = null;
>

Since getPool() is public, one could make the variable private.

>  -    public ConnectionPool getPool() {
>  -        return pool;
>  -    }
>  -
>      protected PoolProperties poolProperties = new PoolProperties();
>
>      public DataSourceProxy() {
>  @@ -125,6 +121,14 @@
>                                                  String password) throws SQLException {
>          return (PooledConnection) getConnection();
>      }
>  +
>  +    public ConnectionPool getPool() {
>  +        return pool;
>  +    }
>  +
>  +    public String getPoolName() {
>  +        return pool.getName();
>  +    }
>
>      /**
>       * {@inheritDoc}
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org