• 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
Re: Multiple WOTask / Adaptors on one host
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple WOTask / Adaptors on one host


  • Subject: Re: Multiple WOTask / Adaptors on one host
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 13 Jan 2004 11:08:00 -0800
  • Organization: Global Village Consulting, Inc.

Hi Pierre,

The last time I had WO running on non-standard ports was with Objective-C. I guess that it not so useful anymore. :-)

As you note, WOContext is broken. It does not even handle the secure binding of WOHyperlink correctly. However - there is an easy solution! Create an WOContext sub-class like this:

public class MyContext extends WOContext {

    public MyContext (WORequest request) {
        super(request);
    }


public String completeURLWithRequestHandlerKey( String requestHandlerKey, String requestHandlerPath, String queryString, boolean isSecure, int somePort) { return super.completeURLWithRequestHandlerKey( requestHandlerKey, requestHandlerPath, queryString, isSecure, isSecure ? 444 : 81); } }

And get your app to use it by adding this method to Application:
public String contextClassName() {
        return "lu.bcl.MyContext";
    }

You will probably want to make the port numbers a configuration property. I'm not aware of any way to get them from the header, but I've not looked in a long while


HTH Chuck

Pierre Bernard wrote:

Hi!

The WOContext method which fails to correctly construct a complete URL is: completeURLWithRequestHandlerKey(). It fails to include the server port number. My guess would be that such a port number has to be found in the headers of the current request. Indeed, the adaptor source code shows a header key named x-webobjects-server-port. I don't know if the adaptor is at fault for not adding that key to the header, if some code lost part of the header or if WOContext.completeURLWithRequestHandlerKey() just misbehaves. I guess I will have to submit a bug report against completeURLWithRequestHandlerKey().

Considering my observations of the issue I would be surprised if anyone running the web server on a port other than 80 gets correct results from completeURLWithRequestHandlerKey().

Moreover, the documentation embedded whithin the JavaMonitor lists a few simple steps for running multiple WOTask deamons on one server. It fails to mention the WOAdaptorState file. I guess this is also worthy of a bug report.

Pierre.

-----Original Message-----
From: Pierre Bernard Sent: Tuesday, January 13, 2004 11:41 AM
To: email@hidden
Subject: Multiple WOTask / Adaptors on one host



Hi!

I am trying to set up a configuration with multiple WebObjects deployment environments on one machine. I am working on a Solaris 2.7 server with one single IP address. The environments should differ by the port number on which the web server is listening.

I have multiple NEXT_ROOTs. For each there is a user who will own the WOTask and application processes. Thus there are multiple instances of Apache running, each with a different setup to talk to a given WOTask instance. For each WOTask there is a JavaMonitor instance.

At first glance everything seems to be fine. Most applications seem to run fine. Some however fail. What fails are WOContext operations that attempt to create a complete URL from an incomming WORequest. The generated URL lacks the port number to the Apache server. Looking at the header of the incoming request I get to wonder how the WOContext is supposed to determine that port number. I expected to find a value for the x-webobjects-server-port. Yet that key is not provided.

What may I have missed?

Another oddity appeared when I tried to ensure that environments do not share the WOAdaptorState. I added the following instruction to the Apache/adaptor config file:

# Ensure that no two instance write to the same cache file
WebObjectsOptions stateFile=WOAdaptorState_Test

When running with the adaptor from WebObjects 5.1, this works fine. The file is created in the /tmp directory as expected. It does no solve my above problem though.

With the WebObjects 5.2 adaptor things are odd. The file is not created. Neither is the one with the default name. An existing file is however deleted. As per the log file the settings are in effect:

Debug: init_adaptor(): beginning initialization. Adaptor version 4.5.1.
Info: init_adaptor(): config options are: String table:
options = stateFile=WOAdaptorState_Test
config = http://localhost:1075
confinterval = 10
username = user
password = password
logPath = /tmp/WebObjectsTest.log
logLevel = Debug
stateFile = WOAdaptorState_Test
Info: Adaptor shared state file: /tmp/WOAdaptorState_Test

Anybody out there using a multiple WOTask setup with success?

Thanks in advance for your input,
Pierre.


**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-deploy mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-deploy
Do not post admin requests to the list. They will be ignored.



**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-deploy mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-deploy
Do not post admin requests to the list. They will be ignored.

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
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: NullPointerException only after first call to batchFetchRelationship
  • Next by Date: Re: WO or PHP?
  • Previous by thread: RE: Multiple WOTask / Adaptors on one host
  • Next by thread: Limiting number of assignments in a many-to-many relationship
  • Index(es):
    • Date
    • Thread