blob: 644865a0430e32303bd0e49f84977cbb3de09764 [file] [log] [blame]
This test does the following:
- Makes sure that a client running within the appserver (JSP in this case) can do a lookup in VisiBroker's Naming Service and then call a remote method on the object looked up.
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 VisiBroker's name service.
2> visi.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> Download the trial version of VisiBroker.
2> add the following to domain.xml :
classpath-suffix="/space/Borland/VisiBroker/lib/ResIndex.jar:/space/Borland/VisiBroker/lib/laf.jar:/space/Borland/VisiBroker/lib/US_export_policy.jar:/space/Borland/VisiBroker/lib/lch.jar:/space/Borland/VisiBroker/lib/asrt.jar:/space/Borland/VisiBroker/lib/axis.jar:/space/Borland/VisiBroker/lib/beandt.jar:/space/Borland/VisiBroker/lib/lm.jar:/space/Borland/VisiBroker/lib/common.jar:/space/Borland/VisiBroker/lib/local_policy.jar:/space/Borland/VisiBroker/lib/commons-discovery.jar:/space/Borland/VisiBroker/lib/log4j.jar:/space/Borland/VisiBroker/lib/commons-logging.jar:/space/Borland/VisiBroker/lib/mail.jar:/space/Borland/VisiBroker/lib/dbswing.jar:/space/Borland/VisiBroker/lib/migration.jar:/space/Borland/VisiBroker/lib/dbtools.jar:/space/Borland/VisiBroker/lib/saaj.jar:/space/Borland/VisiBroker/lib/dom4j.jar:/space/Borland/VisiBroker/lib/sanct6.jar:/space/Borland/VisiBroker/lib/dx.jar:/space/Borland/VisiBroker/lib/sanctuary.jar:/space/Borland/VisiBroker/lib/dxdebug.jar:/space/Borland/VisiBroker/lib/scu_client.jar:/space/Borland/VisiBroker/lib/servlet.ja:/space/Borland/VisiBroker/lib/help.jar:/space/Borland/VisiBroker/lib/vbcdev.ja:/space/Borland/VisiBroker/lib/vbdev.jar:/space/Borland/VisiBroker/lib/itsadmin.jar:/space/Borland/VisiBroker/lib/vbjclientorb.jar:/space/Borland/VisiBroker/lib/jafa.jar:/space/Borland/VisiBroker/lib/vbjdev.jar:/space/Borland/VisiBroker/lib/jaxen.jar:/space/Borland/VisiBroker/lib/vbjorb.jar:/space/Borland/VisiBroker/lib/jaxrpc.jar:/space/Borland/VisiBroker/lib/vbsec.jar:/space/Borland/VisiBroker/lib/jbcl-awt.jar:/space/Borland/VisiBroker/lib/vbsysmib.jar:/space/Borland/VisiBroker/lib/jbcl.jar:/space/Borland/VisiBroker/lib/vbwscdev.jar:/space/Borland/VisiBroker/lib/jdom.jar:/space/Borland/VisiBroker/lib/vbwsdev.jar:/space/Borland/VisiBroker/lib/jds.jar:/space/Borland/VisiBroker/lib/vbwsjdev.jar:/space/Borland/VisiBroker/lib/jdshelp.jar:/space/Borland/VisiBroker/lib/wsdl4j-1.5.1.jar:/space/Borland/VisiBroker/lib/jdsremote.jar:/space/Borland/VisiBroker/lib/xercesImpl.jar:/space/Borland/VisiBroker/lib/jdsserver.jar:/space/Borland/VisiBroker/lib/xmlParserAPIs.jar:/space/Borland/VisiBroker/lib/jnet.jar:/space/Borland/VisiBroker/lib/xmlrt.jar:/space/Borland/VisiBroker/lib/js.jar
<jvm-options>-Djavax.rmi.CORBA.StubClass=com.inprise.vbroker.rmi.CORBA.StubImpl</jvm-options>
<jvm-options>-Djavax.rmi.CORBA.UtilClass=com.inprise.vbroker.rmi.CORBA.UtilImpl</jvm-options>
<jvm-options>-Djavax.rmi.CORBA.PortableRemoteObjectClass=com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl</jvm-options>
<jvm-options>-Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB</jvm-options>
<jvm-options>-Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORBSingleton</jvm-options>
<jvm-options>-Dvbroker.orb.procId=10018</jvm-options>
<jvm-options>-Dborland.enterprise.licenseDir=/space/Borland/VisiBroker/bin/../var</jvm-options>
<jvm-options>-Dborland.enterprise.licenseDefaultDir=/space/Borland/VisiBroker/bin/../license</jvm-options>
<jvm-options>-DSVCnameroot=NameService</jvm-options>
2> open a terminal and start the name service :
% nameserv -config naming.properties NameService
3> start the osagent at default port 14000 :
% osagent
4> compile all the classes "ant build"
5> open another terminal and run the server program as follows:
% cd $APS_HOME/build/module/classes
% /space/Borland/VisiBroker/bin/vbj -DSVCnameroot=NameService HelloServer"
6> start the app server.
7> run : "ant deploy". This will deploy the war consisting on the jsp and the various stubs and run the test.
8> open a web browser and type in
"http://localhost:8080/lookup/visijsp.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.