Hi Miguel,
I would attack this in a different way. Running two or more wotaskd
instances is something I prefer to avoid. I would run a single
instance, either on localhost, or on the machine's hostname.
To handle application references across domains, I would use a
rewrite rule. You can either fail the request, redirect it to the
correct domain, return an error page, or anything that seems suitable.
Put this in www.A.com:
RewriteRule ^/cgi-bin/WebObjects/B.woa http://www.B.woa/cgi-bin/
WebObjects/B.woa [redirect]
Chuck
On Oct 27, 2006, at 10:43 AM, Miguel Arroz wrote:
Hi!
After spending all my afternoon trying to do this, I'm requesting
the help of the more illuminated ones! :)
I want to do something that should be simple: deploy two
different apps, each one in it's virtual host. I want each app to
be accessible on it's virtual host, but not the other. So, I did
the following:
1) According to this <http://developer.apple.com/documentation/
WebObjects/Deployment/Deploying_Applications/Deployment/
chapter_6_section_8.html#//apple_ref/doc/uid/TP30000064-BCIFHCBB> I
launched two instances of WOTaskD and two instances of WOMonitor.
Here are the four launch deamon files (BTW, the platform is 10.4.7
Server):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>GroupName</key>
<string>appserverusr</string>
<key>Label</key>
<string>com.webobjects.wotaskd</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/System/Library/WebObjects/JavaApplications/
wotaskd.woa/wotaskd</string>
<key>ProgramArguments</key>
<array>
<string>wotaskd</string>
<string>-WOPort</string>
<string>1085</string>
<string>-WODeploymentConfigurationDirectory</string>
<string>/Library/WebObjects/Configuration</string>
</array>
<key>ServiceIPC</key>
<false/>
<key>UserName</key>
<string>appserver</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>GroupName</key>
<string>appserverusr</string>
<key>Label</key>
<string>com.webobjects.wotaskd2</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/System/Library/WebObjects/JavaApplications/
wotaskd.woa/wotaskd</string>
<key>ProgramArguments</key>
<array>
<string>wotaskd</string>
<string>-WOPort</string>
<string>1086</string>
<string>-WODeploymentConfigurationDirectory</string>
<string>/Library/WebObjects/SecondConfiguration</
string>
</array>
<key>ServiceIPC</key>
<false/>
<key>UserName</key>
<string>appserver</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>GroupName</key>
<string>appserverusr</string>
<key>Label</key>
<string>com.webobjects.womonitor</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/System/Library/WebObjects/JavaApplications/
JavaMonitor.woa/JavaMonitor</string>
<key>ProgramArguments</key>
<array>
<string>JavaMonitor</string>
<string>-WOPort</string>
<string>56789</string>
<string>-WOLifebeatDestinationPort</string>
<string>1085</string>
<string>-WODeploymentConfigurationDirectory</string>
<string>/Library/WebObjects/Configuration</string>
</array>
<key>ServiceIPC</key>
<false/>
<key>UserName</key>
<string>appserver</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>GroupName</key>
<string>appserverusr</string>
<key>Label</key>
<string>com.webobjects.womonitor2</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/System/Library/WebObjects/JavaApplications/
JavaMonitor.woa/JavaMonitor</string>
<key>ProgramArguments</key>
<array>
<string>JavaMonitor</string>
<string>-WOPort</string>
<string>56790</string>
<string>-WOLifebeatDestinationPort</string>
<string>1086</string>
<string>-WODeploymentConfigurationDirectory</string>
<string>/Library/WebObjects/SecondConfiguration</
string>
</array>
<key>ServiceIPC</key>
<false/>
<key>UserName</key>
<string>appserver</string>
</dict>
</plist>
2) I changed the WebObjects apache configuration file, and set
the following (the real names are masked, of course):
WebObjectsConfig http://vhost1.pt:1085,http://vhost2.pt:1086 10
3) I configured and created the virtual hosts in apache, of
course! :)
Apparently, the combination between WOTaskDs and WOMonitors work
fine. On each monitor I see different stuff, so I suppose they are
not colliding with each other. I configured the first app on the
first monitor, and the second app on the second monitor.
The result is really strange. The first app may be accessed on
either virtual host (ie, vhost1.pt/cgi-bin/WebObjects/app1 and
vhost2.pt/cgi-bin/WebObjects/app2). The second app never starts.
When I turn the switch on, the switch stays forever going from Off
to On, but no process is lauched. I tried to manually launch the
process, and it works, but I cannot access the app from anywhere,
except a direct connection to its port. I tried to turn the app off
using the second WOMonitor (that was still with the switch flipping
from Off to On, and then the switch became flipping from Off to On
eternally. Looks like the second WOMonitor is not working very well.
I searched on the net, and I actually found no one saying "well,
I *have* this working". Just stuff like "try this" and "try that",
and no answers from the original posters saying "it worked,
thanks". I'm starting to think that this doesn't actually work, so,
I ask you: could anybody make this setup successfully? How? What's
the secret? Can you post here the relevant configuration files?
Please? :)
Yours
Miguel Arroz
"GUERRA E' PAZ
LIBERDADE E' ESCRAVIDAO
IGNORANCIA E' FORCA" -- 1984
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects-
[EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/chill%
40global-village.net
This email sent to [EMAIL PROTECTED]
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects-deploy@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to archive@mail-archive.com