facebook

jbossweb-ejb-ref.xml is not getting merged to jboss-web.xml

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #208652 Reply

    navis
    Member

    Hi,

    I have added the *jbosswebxml* configuration to MyEclipse-XDoclet->StandardWeb->webdoclet.
    Additionaly, mergeDir is also specified.

    xdoclet-build.xml contains this tag

    <jbosswebxml Version=”3.2″ destDir=”WebRoot/WEB-INF” mergeDir=”merge” >

    </jbosswebxml>

    In the merge directory, i have jbossweb-ejb-ref.xml.

    Now when i Run XDoclet. jboss-web.xml doesn’t have the tags from jbossweb-ejb-ref.xml. What’s wrong here?

    Any help will be appreciated.

    TIA
    Navjot Singh
    3.0 rc1 + 3.8 beta 1 + Win2K

    #208658 Reply

    Riyad Kalla
    Member

    I have asked our XDoclet guy to take a look at this.

    #208714 Reply

    Greg
    Member

    Navjot,

    If you open the jboss module file for xdoclet…

    <MYECLIPSE_INSTALL_DIR>\eclipse\plugins\com.genuitec.jboss.ide.eclipse.xdoclet.core_3.7.101\xdoclet-jboss-module-1.2.jar

    you will see a file called jboss_web_xml.xdt.

    This file is used to generate the jbosswebxml file. It appears this file doesn’t have a “merge” section. Take a look at another file in the module jar… “jboss_xml.xdt”. In this file you will see a merge section right near the top:

    
    <XDtMerge:merge file="jboss-beans.xml">
         <!--
           To add beans that you have deployment descriptor info for, add
           a file to your XDoclet merge directory called jboss-beans.xml that contains
           the <session></session>, <entity></entity> and <message-driven></message-driven>
           markup for those beans.
         -->
      </XDtMerge:merge>

    In order to get merge support for the jbosswebxml, you need to add a section like this to the jboss_web_xml.xdt file. Use the one above as a example and just rename the merge file to whateve it should be. Repackage the jar and try it out.

    Let us know if it worked for you, and if it did, please post back with all the steps you took and which ones I may have left out or missed. If it doesn’t work, then you might need to consult the xdoclet forums/lists directly or professor google :).

    Hope this helps.

    #208723 Reply

    navis
    Member

    Thx for your help.

    Just by looking at xdt file in jar file, i can come up with 2 ideas.

    1. Specify @jboss.ejb-ref-jndi tags in source file and Xdoclet wil generate ejb-ref tags for you.

    2. if you still like to go for merge. this is way to go.

    a. Copy the jboss_web_xml.xdt file and save it to say d:\project\jboss_web_xml.xdt

    b. Deep down just above </jboss-web> tag add thse lines

    <XDtMerge:merge file=”jbossweb-ejb-ref.xml”>
    <!–
    To add any additional ejb-ref tags that you may not specify in source files.
    –>
    </XDtMerge:merge>

    c. In MyEclipse -> properties -> MyEclipse-XDoclet -> WebDoclet -> jbosswebxml, look out for templateFile attribute.

    d. check it and specify the value.

    e. Run XDoclet.

    Your file will be merged.

    HTH

    #213931 Reply

    Brett Connor
    Member

    I just fell foul of this also, and did basically the same patch. I’m confused though how this comes about; there is much documentation on these merge files in the xdoclet site. Is this a rare case of the documentation being ahead of the xdoclet code or is MyEclipse using an older version of xdoclet? Given that several merge points are missing this is a maintainence issue each time we upgrade MyEclipse versions.

    I would like to vote for more consistent use of xdoclet within MyEclipse also, as discussed in other threads, with respect to:

      setting of default paths/directories (destination, merge)
      creating tags in source rather than directly generating descriptors

    While I like XDoclet in principal, I find web and particularly struts use is not ideal, a lot of the information is not in a naturally useful place; for example ejb references are from POJOs (called from actions) rather than from servlets. I have no particular point here I guess, except that it is almost as hard or inelegant to use xdoclet in these situations as to do things manually. Anything MyEclipse can do to reference and configure things intellegently helps us keep xdoclet in the mix.

    Regards
    Brett

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: jbossweb-ejb-ref.xml is not getting merged to jboss-web.xml

You must be logged in to post in the forum log in