-
1. Re: how to retrieve and store the deployment file name at runtime in JBOSS AS 7
wdfink Feb 12, 2013 1:58 AM (in response to chandrup)I'm not sure if I get your requirements.
If you use the CLI to deploy the application you can set the application names as you want.
In a client you need to know the 'application URL' for http or rmi.
-
2. Re: how to retrieve and store the deployment file name at runtime in JBOSS AS 7
chandrup Feb 13, 2013 9:03 AM (in response to wdfink)I have migrated an EAR application from Jboss 3 to JBoss 7. For JNDI lookups I am using the following syntax in JBoss AS 7.1 (as referred in https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI)
ejb:<app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-
interface
>
where ->app-name : This is the name of the .ear (without the .ear suffix)module-name : This is the name of the .jar (without the .jar suffix)distinct-name : This is a JBoss AS7 specific name which can be optionally assigned to the deployments that are deployed on the serverbean-name : This is the name of the bean for which you are doing the lookupfully-qualified-classname-of-the-remote-interface : This is the fully qualified class name of the interface for which you are doing the lookup.As of now I am hardcoding the app-name,module-name etc.
But instead I need to use the app-name which ever supplied at run time (as like you mentioned in CLI) in the code dynamically instead of hardcoidng.
Is there anyway I can do this, It seems I can make use of property file to retrieve from environment variable or javax.naming.Context as referred in some some forums.
I tried but no luck.
Please advise.
Thanks,
Chandru
-
3. Re: how to retrieve and store the deployment file name at runtime in JBOSS AS 7
jimmy001 Apr 4, 2013 5:04 AM (in response to chandrup)Perhaps the following link can help you:
http://javahowto.blogspot.de/2009/12/how-to-get-module-name-and-app-name.html