- This topic has 6 replies, 3 voices, and was last updated 19 years, 11 months ago by julianhall.
-
AuthorPosts
-
julianhallMemberHi 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
Riyad KallaMemberJules,
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.
Riyad KallaMemberJules,
I think I found something… if you navigate to your:
<MyEclipse install dir>\eclipse\plugins\com.genuitec.eclipse.wizards_3.8.4\Templatesand edit the:
EjbXXX.javafiles I believe you can modify how the generated classes look. although make sure to back them up incase anything gets stomped on.
julianhallMemberThanks, 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
Riyad KallaMemberJules,
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.
GregMemberJules,
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.
julianhallMemberThanks Greg!
-
AuthorPosts