Hi Sudhansu!

I have seen youe work  - BES Xdoclet moduule.
It's a greate job! 


But I still have some remarks and questions ....



I) I think that it is better to use standard tag 

@ejb.persistence column-name="EMP_NO"

than 

@borland:column-descriptor dbms-column="EMP_NO"


There are three main reasons for that:
1. There are already tools like Middlegen which are sucking database
structure and autogenerate entity beans
with xdoclet markup. This tools are using a tag  @ejb.persistence
In simple case (1:1, 1:N unidirectional relations) there is even no need to
provide any extra infomration.



2. It is easier to switch between application servers. If somebody is using
other application server and has his 
project already develop for this application he/she just need to add his BES
specific information
What is also importand - If you want to use one java/xdoclet file and be
ready to deploy your project to many dirrent app servers
you normaly prefer to do:

/**
 *
 * @ejb.persistence column-name="lubs_qty"
 *
 * 
 *  //bea specific part
 *
 *  // jboss specific part
 *
 *  // borland specific part
 */


3. <XDtEjbCmp:dbmsColumn/> is alredy existsing....


II) How can you add infomration about data sources to deployment descriptor?

In my case I used merge file concept ...
   </enterprise-beans>
    
    
   <datasource-definitions>
      <XDtMerge:merge file="ejb-borland-datasources.xml">        
     </XDtMerge:merge>
   </datasource-definitions>
   
   
   <XDtEjbEntity:forAllEntityBeans>
   <XDtEjb:ifIsAConcreteEJBean>
   <XDtEjbCmp:ifEntityIsCmp>
   <table-properties>


After I just use following set of poroperties in Maven


maven.xdoclet.ejbdoclet.borland.0=true
maven.xdoclet.ejbdoclet.borland.0.createtables=false
maven.xdoclet.ejbdoclet.borland.0.version=5.1
#maven.xdoclet.ejbdoclet.borland.0.validateXML=true
maven.xdoclet.ejbdoclet.borland.0.xmlencoding=ISO-8859-1
maven.xdoclet.ejbdoclet.borland.0.destDir=${maven.ejb.src}/META-INF
maven.xdoclet.ejbdoclet.borland.0.mergeDir=src/xdoclet
maven.xdoclet.ejbdoclet.borland.0.datasource=serial://datasources/DataSource


and it does the trick..





III) Bean settings

I have made separate file called :
xdoclet/modules/borland/bes/ejb/resources/ejb-bean-settings_2_0.xdt 
This file contains the set of bean poperties repeated in case of Session,
Entity and MD beans


As you can see I gives also a possiblity of using marge files..
I think than for legacy compatiblity it is quite atrractive feature.

But I have not tested it.....
If you replace "bes" with "borland"  - it should be very easy to use it also
in your case.



     
          <!-- Begining of the bean settings  -->
          <!-- template:
xdoclet/modules/borland/bes/ejb/resources/ejb-bean-settings_2_0.xdt -->
          <!-- ejb-ref(s) --> 
          <XDtMerge:merge file="ejb-borland-ejb-refs-{0}.xml">
          <XDtClass:forAllClassTags tagName="bes.ejb-ref">
           <ejb-ref>
             <ejb-ref-name><XDtClass:classTagValue tagName="bes.ejb-ref"
paramName="ref-name"/></ejb-ref-name>
             <jndi-name><XDtClass:classTagValue tagName="bes.ejb-ref"
paramName="jndi-name"/></jndi-name>
          </ejb-ref>
          </XDtClass:forAllClassTags>
          </XDtMerge:merge>
          <XDtMerge:merge file="ejb-borland-ejb-local-refs-{0}.xml">

          <XDtClass:forAllClassTags tagName="bes.ejb-local-ref">
          <!-- ejb-local-ref(s) --> 
          <ejb-local-ref>
             <ejb-ref-name><XDtClass:classTagValue
tagName="bes.ejb-local-ref" paramName="ref-name"/></ejb-ref-name>
             <jndi-name><XDtClass:classTagValue tagName="bes.ejb-local-ref"
paramName="jndi-name"/></jndi-name>
          </ejb-local-ref>
          </XDtClass:forAllClassTags>
          </XDtMerge:merge>

   
          <!-- resource-ref(s) --> 
          <XDtMerge:merge file="ejb-borland-resource-refs-{0}.xml">
          <XDtClass:forAllClassTags tagName="bes.resource-ref">
          <resource-ref>
             <XDtClass:ifHasClassTag tagName="bes.resource-ref"
paramName="res-name">
             <res-ref-name><XDtClass:classTagValue
tagName="bes.resource-ref" paramName="res-name"/></res-ref-name>
             </XDtClass:ifHasClassTag>
             <XDtClass:ifHasClassTag tagName="ejb.resource-ref"
paramName="res-ref-name">
             <res-ref-name><XDtClass:classTagValue
tagName="bes.resource-ref" paramName="res-ref-name"/></res-ref-name>
             </XDtClass:ifHasClassTag>             
             <jndi-name><XDtClass:classTagValue tagName="bes.resource-ref"
paramName="jndi-name" /></jndi-name>
                 <XDtClass:ifHasClassTag tagName="resource-ref"
paramName="cmp-resource">
             <cmp-resource><XDtClass:classTagValue
tagName="bes.resource-ref" paramName="cmp-resource" /></cmp-resource>
                 </XDtClass:ifHasClassTag>
          <resource-ref>
          </XDtClass:forAllClassTags>
          </XDtMerge:merge>
          
          
          <!-- resource-env-ref(s) -->
          <XDtMerge:merge file="ejb-borland-resource-env-refs-{0}.xml">
          <XDtClass:forAllClassTags tagName="ejb.resource-env-ref">
          <resource-env-ref>
            <res-env-ref-name><XDtClass:classTagValue
tagName="ejb.resource-env-ref" paramName="name"/></res-env-ref-name>
            <jndi-name><XDtClass:classTagValue
tagName="ejb.resource-env-ref" paramName="jndi-name" /></jndi-name>
          </resource-env-ref>
          </XDtClass:forAllClassTags>
          </XDtMerge:merge>
         
         
               
          <!-- property(ies) -->   
          <XDtMerge:merge file="ejb-borland-properties-{0}.xml">
          <XDtClass:ifHasClassTag tagName="bes.property">
          <XDtClass:forAllClassTags tagName="bes.property">
          <property>
                 <XDtClass:ifHasClassTag tagName="bes.property"
paramName="prop-name">          
             <prop-name><XDtClass:classTagValue tagName="bes.property"
paramName="prop-name" /></prop-name>
                 </XDtClass:ifHasClassTag>                
                 <XDtClass:ifHasClassTag tagName="bes.property"
paramName="prop-type">          
             <prop-type><XDtClass:classTagValue tagName="bes.property"
paramName="prop-type" /></prop-type>
                 </XDtClass:ifHasClassTag>                
                 <XDtClass:ifHasClassTag tagName="bes.property"
paramName="prop-value">         
             <prop-value><XDtClass:classTagValue tagName="bes.property"
paramName="prop-value" /></prop-value>
                 </XDtClass:ifHasClassTag>      
          </property>
          </XDtClass:forAllClassTags>
          </XDtClass:ifHasClassTag>
          </XDtMerge:merge>
          
          <!-- End of bean settings -->
   
   
   
   




IV)  I like more tag @bes than @borland

It is shorter. It is also a convention alreday used by other vendors:


Bea          - @weblogic
IBM          - @websphere
Macromedia   - @jrun


Borland      - @bes 
what you think ?


V) Is there alredy a plan to develop Xdoclet GUI plugin for JBuilder :).
This will be very cool!!

kinds regards

Michal


P.S.

I am posting a copy of this letter to XDoclet mailing list, so maybe
somebody will correct me if I am wrong...








-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to