Bug 703562 - Tomcat plugin missing support for JNDI configured Datasources
Summary: Tomcat plugin missing support for JNDI configured Datasources
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: JON Plugin
Version: 2.0.0
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Jean-frederic Clere
QA Contact: Jan Stefl
URL:
Whiteboard:
Depends On:
Blocks: jon30-sprint10, rhq43-sprint10
TreeView+ depends on / blocked
 
Reported: 2011-05-10 17:03 UTC by David Webster
Modified: 2020-12-11 11:35 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
The JBoss Enterprise Web Server’s Tomcat plugin is used to expose configured JNDI Datasources. The plugin is expected to provide relevant Datasource/Connection Pool information but instead it does not provide any information for JNDI Tomcat Datasources. This is a known issue in JBoss Enterprise Web Server 3.0 and there is currently no workaround for this problem.
Clone Of:
Environment:
Last Closed: 2017-10-10 13:51:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Standard UP MBean plugin which includes a Tomcat datasource component (9.91 KB, application/zip)
2011-05-10 17:03 UTC, David Webster
no flags Details
rhq-plugin.xml snippet with Tomcat Datasource service (5.66 KB, text/xml)
2011-06-03 21:09 UTC, David Webster
no flags Details
Actual screen shot for the child resource. (186.13 KB, image/png)
2014-06-17 11:20 UTC, Jean-frederic Clere
no flags Details

Description David Webster 2011-05-10 17:03:26 UTC
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.

Comment 1 Heiko W. Rupp 2011-05-25 08:59:00 UTC
David,
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 ) ?

Comment 3 David Webster 2011-06-03 21:07:03 UTC
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.

Comment 4 David Webster 2011-06-03 21:09:19 UTC
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.

Comment 5 Jay Shaughnessy 2012-01-09 20:49:52 UTC
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:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Comment 8 Larry O'Leary 2013-04-12 19:07:05 UTC
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.

Comment 9 Misha H. Ali 2013-06-13 22:44:24 UTC
Setting flag to nominate for release notes (2.0.1)

Comment 10 Misha H. Ali 2013-06-14 04:45:23 UTC
Added release note information. Adding assignee to confirm or correct this information and suggest a workaround, if one exists.

Comment 11 Libor Fuka 2013-06-14 06:06:13 UTC
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 ?

Comment 14 Jean-frederic Clere 2013-06-27 04:45:03 UTC
that is a know issue.

Comment 17 Jean-frederic Clere 2013-09-30 08:42:26 UTC
The patch looks to be in the branch, weird.

Comment 20 Jean-frederic Clere 2013-10-01 09:03:49 UTC
I have added in the default host in server.xml:
+++
       <Context path="toto">
         <Resource name="jdbc/EmployeeDB" auth="Container"
                   type="javax.sql.DataSource"
            description="Employees Database for HR Applications"/>
       </Context>
+++

Jconsole displays the resource but it doesn't appair in RHQ (I have tried master).

Comment 21 Jean-frederic Clere 2014-03-10 09:08:48 UTC
After a double look comment #20 looks to be wrong.
how should we test the feature?

Comment 22 Jay Shaughnessy 2014-06-13 14:08:16 UTC
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.

Comment 23 Jean-frederic Clere 2014-06-17 11:20:50 UTC
Created attachment 909531 [details]
Actual screen shot for the child resource.

Comment 24 Jean-frederic Clere 2014-06-17 11:25:32 UTC
Do you mean that there should be an add in the screen shot? Where?

Comment 25 Jay Shaughnessy 2014-06-17 13:12:34 UTC
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.

Comment 26 Jean-frederic Clere 2014-07-02 10:11:45 UTC
Acording to JAy comment I haven't fixed the whole BZ.

Comment 27 Jean-frederic Clere 2014-07-09 11:32:31 UTC
Mandar, please keep it as known issue.


Note You need to log in before you can comment on or make changes to this bug.