Hi Wim,
> 1) XMLMerger.xml
> -a) tag <enterprise-beans>: in my original Dep. Descripter there's an
> entity bean with no resource refs (refs to Datasources e.g.). Is it
> possible to put the <resource-ref> tags somewhere in de XMLMerger.xml so
> that they get merged with the earlier <entity>-info. Here's an example:
Well the way it works is that every tag which is in the XMLMerger.xml
file will be merged. If a tag does not appear, it will be appended within
one of the "to be merged" tags.
Using this
<file name="ejb-jar.xml">
<ejb-jar>
<description/>
<display-name/>
<enterprise-beans/>
<relationships/>
<assembly-descriptor/>
</ejb-jar>
</file>
for the ejb-jar will cause the contents of the ejb-jar/description,
ejb-jar/display-name, ejb-jar/enterprise-beans, etc to be appended
from one ejb jar to the next.
Likewise for jboss,
<file name="jboss.xml">
<jboss>
<enterprise-beans/>
<resource-managers/>
</jboss>
</file>
causes the contents of ejb-jar/enterprise-beans and
ejb-jar/resource-managers from one ejb jar to be appended to the next
> -c) what about 'overriding' tags ?
Well I did do this with the attribute merge="false".
<jbosscmp-jdbc>
<defaults merge="false">
<datasource>java:/portalDS</datasource>
<datasource-mapping>PostgreSQL 7.2</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
</defaults>
Basically, this tells the program not to merge the contents but to use
those explicity listed, so any defaults will be ignored from the DDs
to be merged.
> 2) what 'license agreement' is there on your plugin ?
The whole project is GPL.
Does this do what you want it to?
Cheers,
Colin
__________________________________________________
Colin MacLeod
[EMAIL PROTECTED]
ivata.org - open source enterprise groupware
On 24 March, at 2:54 PM, you wrote:
Hi Colin,
I haven't test it yet (had some meeting first), sorry.
But i did take a look at the openportal/ejb/src/xml/XMLMerger.xml
already.
I like the concept, but some questions though:
1) XMLMerger.xml
-a) tag <enterprise-beans>: in my original Dep. Descripter there's an
entity bean with no resource refs (refs to Datasources e.g.). Is it
possible to put the <resource-ref> tags somewhere in de XMLMerger.xml so
that they get merged with the earlier <entity>-info. Here's an example:
======================================================
Original ejb-jar.xml (extraction):
...
<entity >
<display-name>AuthenticationMethodEJB</display-name>
<ejb-name>sfc/AuthenticationMethodEb</ejb-name>
<local-home>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationM
ethodEbLocalHome</local-home>
<local>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationMethod
EbLocal</local>
<ejb-class>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationMe
thodEbBMP</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>be.schaubroeck.prj.sfc.ejb.aa.authentication.Authenticat
ionMethodEbPK</prim-key-class>
<reentrant>False</reentrant>
</entity>
...
=======================================================
XMLMerger.xml (somewhere in this file. There things i like to merge for
that particular entity bean or for all entity beans ...)
<XMLMerger>
<file name="ejb-jar.xml">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>sfc/AuthenticationMethodEb</ejb-name>
<!-- #################################################
-->
<!-- Things to merge ... -->
<resource-ref >
<res-ref-name>jdbc/mySQL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<!-- #################################################
-->
</entity>
</file>
</ejb-jar>
=========================================================
RESULT:
...
<entity >
<display-name>AuthenticationMethodEJB</display-name>
<ejb-name>sfc/AuthenticationMethodEb</ejb-name>
<local-home>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationM
ethodEbLocalHome</local-home>
<local>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationMethod
EbLocal</local>
<ejb-class>be.schaubroeck.prj.sfc.ejb.aa.authentication.AuthenticationMe
thodEbBMP</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>be.schaubroeck.prj.sfc.ejb.aa.authentication.Authenticat
ionMethodEbPK</prim-key-class>
<reentrant>False</reentrant>
<!-- ################################################# -->
<resource-ref >
<res-ref-name>jdbc/mySQL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<!-- ################################################# -->
</entity>
...
=========================================================
-b) Same question for the jboss.xml.
-c) what about 'overriding' tags ?
2) what 'license agreement' is there on your plugin ?
thanks again !
-wil-
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]