• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
best way to use WOHost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

best way to use WOHost


  • Subject: best way to use WOHost
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Tue, 04 May 2004 22:49:37 +0100

Can someone confirm that I am correct in my theory here please:
I currently have one web server (WIN2K/IIS) running WO5.2.1. Note SSL is set up on this box as so:
virtual site 1: www.site1_unsecure.com IP: 200.0.0.1
virtual site 2: www.site2_issecure.com IP: 200.0.0.2


With this setup I can use only one of these as a host in WOMonitor5, but I can not add IP: 200.0.0.2 for example as an additional host since it causes config problems with WOMonitor5 as both hosts are on the same box, but I have read that using -WOHost is the answer to this problem except there is very little about how to correctly use this argument for multiple network interfaces given the problems it causes. However, I found this which I'm hoping does and will sort out the problem; it is not known if this is a real solution it seems but...:

<snip>

Either do not use the WOHost argument, or implement the following code
in dispatchRequest:

public WOResponse dispatchRequest(WORequest aRequest) {
  if (aRequest.uri().indexOf("/womp/instanceRequest") != -1) {
aRequest._setOriginatingAddress(WOApplication.application().hostAddress());
  }
  return super.dispatchRequest(aRequest);
}

It seems better to implement the above code rather than the WOHost argument (which seems to cause problems). Would anyone agree with this?
In retrospect though, is it still ok to use the above code since it is said that the following problem that utilises the above code was fixed in WO5.2.1 (which I'm using):


http://developer.apple.com/techpubs/webobjects/ReleaseNotes/WO52RelNotes/chapter_1_section_3.html

Radar #3094168

When using WOHost on a machine with multiple IP addresses, instances
cannot be controlled by Monitor.

Description:

In previous releases of WebObjects (5.0 and 5.1), a developer could use
WOHost to bind applications to a specific IP address on a multi-IP
machine. In many cases applications could not be deployed with Monitor
without this workaround. In this release, the -WOHost flag to wotaskd
is not respected properly by computers with multiple IP addresses and
therefore Monitor/wotaskd will be unable to manage the applications.

Workaround:

Either do not use the WOHost argument, or implement the following code
in dispatchRequest:

public WOResponse dispatchRequest(WORequest aRequest) {
  if (aRequest.uri().indexOf("/womp/instanceRequest") != -1) {

aRequest._setOriginatingAddress(WOApplication.application().hostAddress(
));
  }
  return super.dispatchRequest(aRequest);
}


Help much appreciated Jonathan :^)

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: InterApplication Communication
  • Next by Date: Best Practice EC Locking for Direct Actions/Concurrent Requests
  • Previous by thread: Re: Cocoa java and EOF
  • Next by thread: Best Practice EC Locking for Direct Actions/Concurrent Requests
  • Index(es):
    • Date
    • Thread