tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yong Gou" <>
Subject cannot get correct attributes and operations from the Data Source mbean created through jconsole GUI
Date Mon, 16 Jan 2006 07:28:33 GMT


Can anyone who has experienced the following problem tell me how to
solve it when creating DataSource mbean on the JMX server of Tomcat
server 5.5.12?

The problem I encountered can be described like this: I used JDK1.5's
jconsole utility to connect to my Tomcat server, after it was connected
I invoked the method void addResource("ds_123", "javax.sql.DataSource")
on the mbean "Catalina:type=NamingResources,resourcetype=Global" to add
a DataSource mbean to the JMX server. This operation should have created
a "Catalina:type=DataSource,class=javax.sql.DataSource,name="ds_123""
mbean with attributes such as username, password, url and with methods
like getConnection, close. But actually the created mbean which only has
attributes like factoryClassName, factoryClassLocation, className and
has methods like remove clear and clone was quite different than the
correct mbean I expected. But with Tomcat admin console webapp, I could
create the DataSource mbean I expected correctly. In my understanding,
these two methods should generate the same result but the truth was not.
I checked some related source code of tomcat admin console webapp such
as but didn't find any clue to get the correct

Acutally I got the same result like what I got using jconsole when I
invoked method void addResource("ds_123", "javax.sql.DataSource") on the
mbean "Catalina:type=NamingResources,resourcetype=Global" in a java
program. How can I create a DataSource mbean with the correct attributes
and methods like the mbean created using Tomcat admin console webapp.


Thank you in advance!




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message