-
1. Re: enquiry on EJB invocations from remote client using JNDI
ktfan Mar 14, 2012 4:20 AM (in response to ktfan)I found the system property replacement here :
https://issues.jboss.org/browse/EJBCLIENT-29
Can someone here provide some sample codes on how do handle the system property replacement ?
-
2. Re: enquiry on EJB invocations from remote client using JNDI
jaikiran Mar 14, 2012 4:25 AM (in response to ktfan)1 of 1 people found this helpfulThe system property replacement will be handled by the library. All you have to do is use the ${systempropertyname} in your property file and then pass the system property using the -Dsystempropertyname=value while starting the application. If you want to specify a default for the system property, so that it will be used in the absence of the system property being set, then just use ${systempropertyname:default-value}. The ":" separates the property name from the default value.
-
3. Re: enquiry on EJB invocations from remote client using JNDI
ktfan Mar 14, 2012 4:36 AM (in response to jaikiran)Jaikiran Pai, thanks for the tips.
Besides this way, is it possible to change the System Property programatically during execution ?
-
4. Re: enquiry on EJB invocations from remote client using JNDI
dmlloyd Mar 14, 2012 5:00 PM (in response to ktfan)Using system properties is really not the right way to resolve this problem though.
An EJB is identified by the deployment it is contained in. If two identical EJBs with the same bean and deployment names are deployed on two systems, and you connect to both systems, the EJBs are considered equivalent and interchangeable. If you want to assert a non-equivalence between them, you need to introduce what we call a "distinct name" into each EJB deployment, so that they are considered different by the client library. Then you can create separate proxies for each distinct name and invoke on each one selectively.
-
5. Re: enquiry on EJB invocations from remote client using JNDI
jaikiran Mar 14, 2012 10:32 PM (in response to dmlloyd)David is right (ofcourse) about the use of distinct name. The system property expansion that I mentioned was in reply to your question about EJBCLIENT-29. I missed the fact that you actually had a different question in your first post of this thread.