Enabling JMX for proxool with tomcat
Posted
by
dialt0ne
on Server Fault
See other posts from Server Fault
or by dialt0ne
Published on 2011-02-17T22:40:50Z
Indexed on
2011/02/17
23:27 UTC
Read the original article
Hit count: 306
I am trying to get proxool's MBeans available so that I can see/manipulate them with jconsole. I have jconsole working, but I don't see anything related to proxool.
The system is using Sun Java 1.5.0_17 (I know, I know... I'm working with the developers to upgrade). JMX is enabled by modifying $JAVA_OPTS in my tomcat 5.5 startup script:
SJO="$SJO -Dcom.sun.management.jmxremote"
SJO="$SJO -Dcom.sun.management.jmxremote.port=4998"
SJO="$SJO -Dcom.sun.management.jmxremote.authenticate=false"
SJO="$SJO -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS $SJO"
I have proxool configured with JNDI in server.xml:
<GlobalNamingResources>
<Resource
name="jdbc/database"
auth="Container"
type="javax.sql.DataSource"
factory="org.logicalcobwebs.proxool.ProxoolDataSource"
user="username"
password="password"
proxool.driver-url="jdbc:oracle:thin:@fqdn.example.com:1521:MYSID"
proxool.driver-class="oracle.jdbc.driver.OracleDriver"
proxool.alias="mysid"
proxool.maximum-connection-count="20"
proxool.statistics="20s,5m,15m"
proxool.statistics-log-level="INFO"
proxool.jmx="true"
proxool.verbose="true"
/>
</GlobalNamingResources>
My test .jsp can run queries and I can see it using the connections with the proxool admin servlet, but I'm unsure if there's more I need to configure in tomcat or proxool to get JMX functioning.
Advice?
jmxproxy info edit:
The jmxproxy servlet is working - when I go to the URL http://tomcatserver.example.com:4999/manager/jmxproxy/?qry=*:type%3DRequestProcessor,*
the results are:
OK - Number of results: 2
Name: Catalina:type=RequestProcessor,worker=http-8080,name=HttpRequest0
modelerType: org.apache.coyote.RequestInfo
bytesSent: 0
requestBytesSent: 0
contentLength: -1
bytesReceived: 0
requestProcessingTime: 1297983483666
globalProcessor: org.apache.coyote.RequestGroupInfo@32dc51c8
requestBytesReceived: 0
serverPort: -1
stage: 0
requestCount: 0
maxTime: 0
processingTime: 0
errorCount: 0
Name: Catalina:type=RequestProcessor,worker=jk-127.0.0.1-8009,name=JkRequest794
modelerType: org.apache.coyote.RequestInfo
virtualHost: tomcatserver.example.com
bytesSent: 0
method: GET
remoteAddr: 172.30.3.51
requestBytesSent: 0
contentLength: -1
workerThreadName: TP-Processor15
bytesReceived: 0
requestProcessingTime: 9
globalProcessor: org.apache.coyote.RequestGroupInfo@1e7d3b8e
protocol: HTTP/1.1
currentQueryString: qry=*%3Atype%3DRequestProcessor%2C*
requestBytesReceived: 0
serverPort: 4999
stage: 3
requestCount: 0
maxTime: 0
processingTime: 0
currentUri: /manager/jmxproxy/
errorCount: 0
And more to the point http://tomcatserver.example.com:4999/manager/jmxproxy/?qry=Catalina:type%3DEnvironment,resourcetype%3DGlobal,name%3DProxool
yields:
OK - Number of results: 0
© Server Fault or respective owner