Hi, François and Mark,

Actually, I think WO allows either the old NeXTStep defaults form:

  -mainInstance YES

or the newer Java Properties form:

  -DmainInstance=true

but I think you have to follow the conventions for either side all the way through. That is, for the Java form:

  * prefix the argument with "-D"

  * separate the key from the value with "=" and no spaces

* use "true" or "false" for boolean values (I think the uppercase equivalents are OK as well, but not sure)

and for the NeXT defaults form:

  * prefix the argument with "-" (and no "D")

  * separate the key from the value with one or more spaces

* use "YES" or "NO" for boolean values (I think the lowercase equivalents are OK as well, but not sure)

In general, I think the Java Property form for arguments is safer because the other form may be deprecated someday.

Technology migration sure can be confusing!

Regards,
Jerry

On Mar 23, 2006, at 4:39 AM, Mark Morris wrote:

I think it should be:

        -DmainInstance=TRUE

Regards,
Mark

On Mar 23, 2006, at 3:10 AM, François Reboursier wrote:

This seems very seductive, but when I configure my instance and try to retreive the property ('String isMainInstance = System.getProperty("mainInstance");' ) all I get is a NULL value...

On Mar 22, 2006, at 15:36, Doug Andrews wrote:

You could add an argument into JavaMonitor for one instance but not the others.
(-mainInstance TRUE)
Retrieve this property within your code with System.getProperty ("mainInstance")

On Mar 22, 2006, at 8:32 AM, François Reboursier wrote:

        Hi list,

I perform some maintenance operations at application startup by catching the WOApplication.ApplicationDidFinishLaunchingNotification It works fine in testing, but in deployment mode the maintenance code is called many times (once for each instance): this is perfectly logical.

Is there a way to get the current instance number (to only perform the maintenance in instance #1 ) ? is there an other way to call this method one time, and one time only ?

Thanks for your ideas!

Regards,
François


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to