| This test consists of the following: |
| 1> HelloServer.java : server program written using idl. It binds a string "Hello" into an external name service started via orbd. |
| 2> newjsp.jsp : This is the client that is running in the app server. It tries to talk to the external name service to lookup "Hello" object and then invokes a method on it via RMI. |
| |
| For running the test: |
| 1> open a terminal and start the orbd as follows: |
| "orbd -ORBInitialPort 1345" |
| 2> open another terminal and run the server program as follows: |
| "java HelloServer -ORBInitialPort 1345" |
| 3> start the app server. |
| 4> run : "ant all". This will deploy the war consisting on the jsp and the various stubs and run the test. |
| 5> Another way of running the test is :open a web browser and type in |
| "http://localhost:8080/lookupviajsp/newjsp.jsp" |
| Once the lookup is successful, it prints "Hello World!!" as expected. |
| Remember that the server program exits once this happens. |
| To run the JSP again, you will have to restart the server program otherwise |
| you will get a "Connection refused.." error. |
| |
| This test uses CNCtxFactory as the InitialContextFactory class. |
| Make sure that the port used for com.sun.CORBA.ORBServerPort and |
| com.sun.CORBA.POA.ORBPersistentServerPort is the same and is an unused TCP/IP |
| port. |
| The above 2 ports need to be set since CNCtxFactory internally initializes a new orb. |
| The org.omg.CORBA.ORBInitialPort should be set to the same port where the orbd has its Name Service running. |