[harbor] Self Discovery?

  • From: "Johnny Kewl" <john@xxxxxxxxxxxxxxx>
  • To: <harbor@xxxxxxxxxxxxx>
  • Date: Wed, 10 Sep 2008 13:53:48 +0200

       String harborUrl = "http://localhost:8080/harbor/service";;
       Vessel.loadAppConfig(); //Set application to delivery server
       String harborUrlTmp = Vessel.getAppProperty("HARBOR.SITE.CONTEXT");
       if(harborUrlTmp != null) harborUrl = harborUrlTmp;

       vessel = new Vessel(harborUrl); //get a vessel from the harbor
       vessel.enableProgressDisplay(true); //for internet apps


The logic is... use by dev environment, but if delivered from a server (ie its a SHIP), then use that.

All Harbor really wants you to set is this

   vessel = new Vessel(harborUrl); //get a vessel from the harbor

and in many cases, especially inside a co, you will hard code it...
but we also made it so that if you havnt done that and want the clients to talk to the server that the ship came from... its automatic...

Your client (GHOST) just has to know where the application is... thats all thats happening.

In 108... if you use a query string from a browser, you can get at those parameters in the same way.

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------



Other related posts: