[jopr-dev] Inverted plugin dependencies / optional dependencies

John Mazzitelli mazz at redhat.com
Tue May 12 08:30:06 EDT 2009


This was the issue that the plugin packs brought to light.

We need a way to somehow have the declarations be in the descriptor but not cause the deployment to fail if the plugin does not exist (i.e. we'd ignore the resource types for things that need a plugin that doesn't exist).

I'm pretty sure we wrote a JIRA on this recently - Jay S. might have written it up.

----- Original Message -----
From: "Heiko W.Rupp" <hwr at redhat.com>
To: "jopr-dev" <jopr-dev at lists.jboss.org>
Sent: Tuesday, May 12, 2009 8:24:41 AM GMT -05:00 US/Canada Eastern
Subject: [jopr-dev] Inverted plugin dependencies / optional dependencies

Hi,

currently we have plugin dependencies that a "child" plugin can say it  
depends on a parent plugin

E.g. in the hibernate plugin:

    <depends plugin="JMX" />
    <depends plugin="JBossAS" useClasses="true"/>

and later

       <runs-inside>
          <parent-resource-type name="JMX Server" plugin="JMX"/>
          <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
       </runs-inside>

Now if I would want to re-use the hibernate plugin in the AS5 plugin,  
I could write:

    <depends plugin="JMX" />
    <depends plugin="JBossAS" useClasses="true"/>
    <depends plugin="JBossAS5" useClasses="true"/>

But a) 2x useClasses="true" is probably not allowed and b) it would
require that both the as4  + as5 plugin need always to be present, even
in the case of Embedded Jopr within AS5.

So one way to tackle this could be that the Hibernate plugin is not  
declaring a
depencency on the AS* plugins, but that the AS* plugins "import" the  
Hibernate plugin

<import plugin="Hibernate"/>

This also has the advantage that the Hibernate plugin would not need  
to be
modified when e.g. it should be used within e.g. the Tomcat plugin.


Another option could be to mark/group optional or mutual exclusive  
dependencies

    <depends plugin="JMX" />
    <mutual-exclusive>
       <depends plugin="JBossAS" useClasses="true"/>
       <depends plugin="JBossAS5" useClasses="true"/>
   </mutual-exclusive>

Here only one of AS4 or AS5 plugins needs to be present and the JMX  
plugin is required.


One thing we need with both approaches is to meaning fully inject the  
parent resource and/or
existing EmsConnections (I have the feeling that very often the parent  
is needed because of its
connections to the remote).



-- 
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach bei  
München
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,  
Charles Cachera


_______________________________________________
jopr-dev mailing list
jopr-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jopr-dev




More information about the jopr-dev mailing list