How to specify the context for an EJB in JBOSS -
I've got some legacy code that runs in jeans which looks like this:
< Code> @Stateless @Remote (MyClass.class) @RemoteBinding (jndiBinding = "app / service") public class myServiceBean {// some methods}When I see Bean in JNDI I look for the use of a string:
ear-name / service / remote
I'm fine with the last two parts of the name , But I do not have context with "ear-file" As I am being used as Maven, I will create the version number in the ear-file (which I want to traceability), but this means That whenever I release I will have to change all references to the service
Text "itemprop =" text ">You can set your ear name in application.xml like this:
& lt; Application-name & gt; Ear-name & lt; / Application-name & gt;
Then you can have ear-namexxx.ear but your lookup will be done in the ear-name
You can also do this for ejac modules: < / P>
& lt; Ejb-jar & gt; & Lt; Module-name & gt; EJB name & lt; / Module-name & gt; & Lt; / EJB-Jar & gt;
Hope it helps!
Source
Comments
Post a Comment