How to configure multiple entry points in the bank of the application client?
I am using Glassfish application server. I can capture a client using
asadmin get-client-stubs --appname APPLICATION_NAME .
Currently, I can run the default main class, which I specified in MANIFEST.MF. However, I want to be able to specify a different main class at runtime.
t
appclient -client MYJAR.jar -mainclass com.mystuff.Main1
and
appclient -client MYJAR.jar -mainclass com.mystuff.Main2
Both Main1 and Main2 have entry points "public static void main".
If I specify a main class that is not in MANIFEST.MF, I get the following exception:
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: Could not locate an embedded app client matching the main class name
Do I need to make any changes so that the link to the appclient is in other main classes?