facebook

Insert tags for bean in jboss.xml [Enhancement/Workaround]

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

    I want to create JBoss support for SSL. One of the requirements is that in jboss.xml in each session bean segment, the following XML tags are inserted:

    
    <invoker-bindings>   
        <invoker>
         <invoker-proxy-binding-name>stateless-ssl-invoker</invoker-proxy-binding-name>
        </invoker>
    </invoker-bindings>
    

    Then a session bean segment would look like this:

    
    <session>
       <ejb-name>Echo</ejb-name>
       <jndi-name>ejb/EchoBeanHome</jndi-name>
       <configuration-name>Standard Stateless SessionBean</configuration-name>
       <invoker-bindings>
          <invoker>
             <invoker-proxy-binding-name>stateless-ssl-invoker</invoker-proxy-binding-name>
          </invoker>
       </invoker-bindings>
       <m_e_t_h_o_d-attributes/> 
    </session>
    

    Can this be done with MyEclipse and XDoclet? Using the jboss-beans.xml merge-file only seems to work if every session bean segment is inserted there, and then I must somehow turn off the jboss.xml generation from each session bean EJB. Is there a simpler way to insert the above code segment without a cumbersome copy-and-paste routine?
    (excuse the strange tag in the code segment, but the forum engine is not ready for a “method tag”) 😉

    #205768 Reply

    Greg
    Member

    KennethAitken,

    As you probably already know, xdoclet does not have attribute tags for invoker-bindings that can be specified on a per session bean basis. You are correct in that having to use the merge-file negates the whole reason for using xdoclet attributes because in the merge file you have to supply the entire session bean declaration.

    The solution to your problem is to change the template file that is used for jboss.xml files for just your project. In the template file, there is a section for all session beans. Adding your <invoker-bindings> tag to that section would add your custom tags to all session ejb declarations in the jboss.xml file. The problem is you can’t easily change the default jboss.xml template file. There is a property on the jboss subtask called jbossTemplateFile that lets you specify a alternate template file that will be used to generate jboss.xml files. However, the current MyEclipse-Xdoclet can only support loading alternate template files from the bundled xdoclet jar files. It doesn’t support loading alternate template files from an arbitrary location like a ME project as you would need. An enhancement to xdoclet needs to be made to support loading external jbossTemplateFiles.

    Thank you for bringing this to our attention. We will add your support question and this solution as an enhancement request. The ME developers are busy adding many new features to the product, hopefully they can get this one in.

    #205770 Reply

    Greg
    Member

    Good news….

    It looks like this issue has just recently been addressed, when I mean recently, I mean a few hours ago 🙂

    http://opensource.atlassian.com/projects/xdoclet/browse/XDT-795

    The PR I entered has now been updated to be sure and include this patch in the next ME release.

    #205899 Reply

    Dear Greg

    Thank you very much for your quick response. I was beginning to feel helpless in this situation of keeping a large number of session beans in synch. I look forward to the next ME release. 😀

    #207092 Reply

    Greg
    Member

    This xdoclet issue along with a few other fixes/enhancements are going to be fixed at the same time that xdoclet 1.2.1 support is upgraded in MyEclipse, which is slated for 2.8 beta2. This release will be out a few weeks after 2.8 beta1 which is due VERY SOON.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Insert tags for bean in jboss.xml [Enhancement/Workaround]

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