tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <dmik...@vmware.com>
Subject Re: Changing tomcat connection pool size through jmx
Date Fri, 08 Mar 2013 13:10:13 GMT
On Mar 7, 2013, at 10:11 PM, Amit wrote:

> I tried setting the 'maxActive' attribute by double clicking it and modifying the value
but the new value does not get set.

What happens?  Do you get an error?  If so, what does it say?

> 
> The bug 50864 was suppose to provide the flexibility to update the connection pool properties
through JMX and this is what I was looking for. Shouldn't that be the case?

Tested with Tomcat 7.0.37 and it works fine for me.

Steps used to test:

1.) Configure Global Resource tag using H2 database
2.) Start Tomcat 7.0.37
3.) Connect using jvisualvm
4.) Go to MBeans tab
5.) Browse to tomcat.jdbc -> ConnectionPool -> "<pool-name>" -> org.apache.tomcat.jdbc.pool.DataSource.
6.) Double click "maxActive", change value, press enter.
7.) Value is saved.  Refreshing shows the new value.

Dan


> 
> thanks.
> 
> On 08-Mar-2013, at 1:40 AM, Daniel Mikusa <dmikusa@vmware.com> wrote:
> 
>> On Mar 7, 2013, at 12:32 PM, amit shah wrote:
>> 
>>> I was looking at jmx since that would not need application server restart.
>>> 
>>> I didn't understand what you meant by "Have you tried looking at /
>>> modifying the attributes" ?
>> 
>> When you look at an Mbean in jconsole or jvisualvm, you'll see a few different tabs
but there should be one which lists Attributes (i.e. the values exposed through JMX) and one
that lists Operations (i.e. functions exposed through JMX).
>> 
>> Attributes list the properties of an mbean and some properties can be changed on
the fly by double-clicking them and setting a new value.  I believe that's how you would adjust
the connection pool properties.  Does that work for you?
>> 
>> Dan
>> 
>> 
>>> 
>>> 
>>> On Thu, Mar 7, 2013 at 9:50 PM, Daniel Mikusa <dmikusa@vmware.com> wrote:
>>> 
>>>> On Mar 7, 2013, at 9:59 AM, amit shah wrote:
>>>> 
>>>>> Hello,
>>>>>     I use tomcat connection pool in my web application by using two
>>>>> jars - tomcat-jdbc-7.0.34.jar and tomcat-juli-7.0.34.jar. I want to
>>>> change
>>>>> the connection pool size through jmx but I could not find any defined
jmx
>>>>> operation for doing that.
>>>> 
>>>> Are you strictly looking at JMX operations?  Have you tried looking at /
>>>> modifying the attributes?
>>>> 
>>>> Dan
>>>> 
>>>>>      I noticed that bug
>>>>> 50864<https://issues.apache.org/bugzilla/show_bug.cgi?id=50864>
>>>>> specifies
>>>>> that tomcat allows updating the connection pool size through jmx from
>>>>> tomcat 7.0.28 onwards. I use 7.0.34 version for jars. Am I missing
>>>>> something?
>>>>> 
>>>>> Thank you
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

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


Mime
View raw message