You can create an application client that run into the Apache Geronimo application client container rather than running in your computer.
You only need to create a jar file with these files for a simple example that only will write "CLIENT RUNNING..." by console:
1. - client/MainClient.java
2. - META-INF/application-client.xml
3. - META-INF/geronimo-application-client.xml
You need to define two modules, one for client side and one for server side. EXAMPLEClientServer is the component that always its going to be running, and EXAMPLEClient its the comonent that you are going to start with client.jar util.
4. - META-INF/MANIFEST.MF
MANIFEST must contain the Main-Class and blank line at the end of the file.
With this bat file, you can create the J2EE application client jar file (I named it app_client.jar) if you have the compiled files and xml files and the our manifest.mf into one folder (in my case D:\workspace2\GERONIMO_APPLICATION\bin). The M jar command´s paramenter indicate that jar file must be created ussing our MANIFEST.MF file. Verify that this is correct after create jar file.
After deploy, you have to see the two components into Geronimo Web Console -> Applications -> App Clients:
You can run Application client with this command:
java -jar %GERONIMO_HOME%/bin/client.jar JEE5/EXAMPLEClient/1.1/car