Created attachment 498104 [details]
Standard UP MBean plugin which includes a Tomcat datasource component
Description of problem: Current Tomcat plugin does expose configured JNDI Datasources.
Version-Release number of selected component (if applicable): RHQ 3.x, RHQ 4.x, JON 2.4, JON 3.-
How reproducible: N/A
Actual results: Tomcat (JBoss EWS) plugin does not provide any information for configured JNDI Tomcat Datasources.
Expected results: The same kind of Datasource/Connection Pool info available for JBoss EAP/EWP should be available for JBoss EWS (Tomcat).
Additional info: Attached is a set of standard custom JMX plugins we use at Union Pacific. They include a Spring Datasource, Identity (Who Am I) MBean, Log4J, our internal ESB configuration, but of interest to this ticket a EWSDatasourceComponent that exposes the Tomcat Datasources.
could you please add the rhq-plugin.xml snippet that is used for the EWSDatasourceComponent ?
And if this is using a special discovery class that one as well (But then I guess, you are just using the standard MBeanResourceDiscoveryComponent ) ?
Oops, think I sent the wrong rhqplugin.xml. I have two versions of our standard JMX plugin, one that is designed for Stand Alone JVMs that would not have the Tomcat Datasource supported and essentially the same one but that contains the Tomcat Datasource for the container instances.
Attached is snippet with the Tomcat Datasource service.
Created attachment 502909 [details]
rhq-plugin.xml snippet with Tomcat Datasource service
Missing rhq-plugin.xml code to support the Tomcat Datasource that matches the EWSDatasourceComponent and Discovery java code.
master commit 791205857b2e3550e51ea1e101b8a4704ebfad33
Added support for Datasources. Tomcat allows DS Resource declaration at the
global/host/app level. A global DS is available to all apps, a host DS is
available to all apps for that host, and then at the app level, just the
declaring app. As such Tomcat creates DS Mbeans at the app level, one for
each DS available to the app. This structure is reflected in the updated
Tomcat resource hierarchy. Although there is seeming redundancy for global
and host level datasources, it seems to best reflect the TC intents, and
also the underlying mbeans.
For more on configuring datasources see:
This looks like it may have already been done in the 3.1.2 (EWS 2.0) Tomcat plug-in. Someone should verify and QE should confirm.
Setting flag to nominate for release notes (2.0.1)
Added release note information. Adding assignee to confirm or correct this information and suggest a workaround, if one exists.
It looks like RFE for future releases and not bug and should be excluded from EWS 2.0.1 release notes.
What do you think Jean-Frederic ?
that is a know issue.
The patch looks to be in the branch, weird.
I have added in the default host in server.xml:
<Resource name="jdbc/EmployeeDB" auth="Container"
description="Employees Database for HR Applications"/>
Jconsole displays the resource but it doesn't appair in RHQ (I have tried master).
After a double look comment #20 looks to be wrong.
how should we test the feature?
Sorry for the late reply for info. In general in the UI you manually add resources from the parent's detail view, under the Inventory->Child Resources subtab.
Created attachment 909531 [details]
Actual screen shot for the child resource.
Do you mean that there should be an add in the screen shot? Where?
Sorry if I confused things. The "Need Info" above asked me, "Where can i find the option for adding datasource in JON UI ?".
The real answer is that you won't find it because there is no way that I see to add a Datasource manually via the UI. From what I can see a Datasource resource can show up under a WAR whenever TC is configured to provide that DS to the WAR, whether it's globally declared or packaged in the WAR itself. It will be autodiscovered.
My prior answer was more a general response, yes, if a parent resource type allows manual import of a child resource, it would be a button in the view you have in the screenshot, but it's not relevant here.
Acording to JAy comment I haven't fixed the whole BZ.
Mandar, please keep it as known issue.