THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- To deploy the EJB application on to server Export the EJB application as a jar file. Right Click on SimpleEJB application and Select Export->EJB JAR File as shown in the figure.
!!
- Browse to the Destination of your choice and Select Finish. This will export the SimpleEJB application as a jar file. This jar will be later deployed on to Geronimo server
Warning title Why to Export EJB? Why cannot I use Eclipse for deploying the EJB application on the server? Due to some limitation Eclipse is not able to deploy the EJB application on to server. This issue will be fixed very soon.
- Start the server and Launch the Administrative Console. Under Applications, Select Deploy New and Deploy the SimpleEJB.jar on the server.
- Once the Deployment is successful. Open <GERONIMO_HOME>/var/log/server.log. Find the following in server.log
As can be seen openEJB container after deployment suggests the Remote as well as Local lookup names.Code Block title Snippet from server.log after deployment of SimpleEJB borderStyle solid 18:16:39,750 INFO [startup] Jndi(name=CountryCapitalBeanLocal) --> Ejb(deployment-id=SimpleEJB/CountryCapitalBean) 18:16:39,750 INFO [startup] Jndi(name=CountryCapitalBeanRemote) --> Ejb(deployment-id=SimpleEJB/CountryCapitalBean)
In this case since the SimpleEJB application and Java Application Client are running on different instances of JVM. We need to have the CountryCapitalBeanRemote as the lookup name. - Under Eclipse Right Click on the Application Client project and Run as a Java application.
Sample Input1: India
Sample Input2: China
Sample Input3: United States Of America
Sample Input4: France