Bug 575849

Summary: Add Dynamic Template Inclusion into Plugin
Product: [Other] RHQ Project Reporter: Ted Jones <tejones>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 1.3CC: jshaughn, tejones
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-28 00:48:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ted Jones 2010-03-22 14:33:07 UTC
Description of problem: Unable to dynamically add a template for use in a plugin. The template needs to added explicitly to the rhq-plugin.xml. 


Version-Release number of selected component (if applicable): RHQ 1.3


How reproducible: 


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info: The Teiid project allows users to create custom connectors which will have templates that can be used for other versions of the custom connectors. Currently the Teiid Jopr plugin has to be edited to include the connector template. This should be done dynamically somehow either by including an xml file with the new template or some other means. Migration to newer versions of the Teiid plugin are problematic if the custom connector template needs to be explicitly included in the rhq-plugin.xml.

Comment 1 Charles Crouch 2010-06-25 17:59:06 UTC
Ted could you attach some exmaples of the sort of templates you are wanting to add so that we can see if they would be suitable for inclusion in the default set that comes with the AS plugin

Comment 2 Ted Jones 2010-06-28 16:34:03 UTC
(In reply to comment #1)
> Ted could you attach some exmaples of the sort of templates you are wanting to
> add so that we can see if they would be suitable for inclusion in the default
> set that comes with the AS plugin    

Charles,

There are two types of connections in Teiid that require templates. 

1. Teiid as a source. This is a standard JDBC connection to a Teiid VDB using either xa or non-xa. It would be just like the Oracle xa template except that there would be addition properties for DatabaseName, port, and serverName.

So a non-xa template would look something like this:
    <c:simple-property name="driver-class" default="org.teiid.jdbc.TeiidDataSource"/>
    <c:simple-property name="type-mapping" default="org.teiid.jdbc.TeiidDataSource"/>
    <c:map-property name="metadata">
        <c:simple-property name="typeMapping" default="Teiid"/>
    </c:map-property>
    <c:simple-property name="type-mapping" default="Teiid"/>
    <c:map-property name="connection-properties">
     <c:simple-property name="database-name" default="MyDatabase"/>
     <c:simple-property name="port" default="31000"/>
     <c:simple-property name="server-name" default="localhost"/>
    </c:map-property>

2. Underlying Teiid sources (LDAP, File, SalesForce, WebService, Custom). These would be non-standard JDBC connections that should only display on a JBossAS instance where Teiid is deployed. There are two ways we see this be implemented (and there are surely more than that). Both would require adding xml imports of xml fragments to the JBossAS plugin descriptor that can be referenced as doc type entities in the appropriate node of the rhq-plugin.xml.
  
a.) Allow the xml fragments to be provided in a well-known location and added if they exist.

b.) Dynamically generate the xml fragments based on the deployed templates on the server. Teiid deploys templates for the connection factories it supports to allow for creation of new instances.

Comment 3 Charles Crouch 2010-11-02 00:33:46 UTC
This is something we are going to be able to target for JON2.4.1. Move it to consideration for JON3.0