facebook

How to change the default xdoclet ejb generation? [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #224193 Reply

    julianhall
    Member

    Hi quick question about how to change the defualt ejb xdoclet tag generation? For example when you generate an SLSEJB you get something like:


    * @ejb.bean name=”ListAccessor”
    * display-name=”Name for ListAccessor”
    * description=”Description for ListAccessor”
    * jndi-name=”ejb/ListAccessor”
    * type=”Stateless”
    * view-type=”remote”

    all my ejb’s that i create have a standard set of information. So how would i always generate the local-jndi-name as well when i create a new ejb? eg:


    * @ejb.bean name=”ListAccessor”
    * display-name=”Name for ListAccessor”
    * description=”Description for ListAccessor”
    * jndi-name=”ejb/ListAccessor”
    * local-jndi-name = “ejb/ListAccessorLocal”
    * type=”Stateless”
    * view-type=”both”
    ….

    Thanks,

    Jules

    #224262 Reply

    Riyad Kalla
    Member

    Jules,
    I’ve asked one of the devs about this because honestly I don’t know. I’ll post his reply when he sends it to me.

    #224269 Reply

    Riyad Kalla
    Member

    Jules,
    I think I found something… if you navigate to your:
    <MyEclipse install dir>\eclipse\plugins\com.genuitec.eclipse.wizards_3.8.4\Templates

    and edit the:
    EjbXXX.java

    files I believe you can modify how the generated classes look. although make sure to back them up incase anything gets stomped on.

    #224287 Reply

    julianhall
    Member

    Thanks, I gave that a go, but it didnt seem to do anything. I just added in the local-jndi-name param… but nothing happened.

    I just updated to 3.8.4 and restarted my workbench and tried again, but with no success either.

    However, I did notice that in the new features it had at the bottom of the page:

    New XDoclet Tag Templates
    The XDoclet Tag templates have been updated with new useful templates.

    And there was a list of new templates to do with Entity, Session, etc.

    But when i look at my templates i still have the old template1 and template2. Is there another step I need to do to refresh the xDoclet templates?

    Thanks,

    Jules

    #224289 Reply

    Riyad Kalla
    Member

    Jules,
    Make sure you restarted Eclipse atleast once with the -clean command line argument to let it rebuild the plugin cache, then go to the Window > Prefs > MyEclipse > XDoclet page and hit Refresh, then go down one level to code assit and hit refresh there as well. See if that helped.

    #224297 Reply

    Greg
    Member

    Jules,

    Here is the file that you want to modify to change the template for how session bean xdoclet tags are created.

    <myeclipse_install>eclipse\plugins\com.genuitec.jboss.ide.eclipse.xdoclet.ui_3.8.3\resources\templates\ejb\session\Template.properties

    In this file after the jndi-name you would add a line like this:

    \ *           local-jndi-name="ejb/{0}Local"\n\

    That should do what you want. Hope this helps.

    #224313 Reply

    julianhall
    Member

    Thanks Greg!

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: How to change the default xdoclet ejb generation? [Closed]

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