• 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: set SQL server as Argument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set SQL server as Argument


  • Subject: Re: set SQL server as Argument
  • From: Francis Labrie <email@hidden>
  • Date: Tue, 13 Apr 2004 12:58:28 -0400

Hi,


Sako! wrote:
as u know in WO there is meny arguments ex:
-WOLifebeatDestinationPort 1085

i want to ask if i can set the sql server as an arguments something like

-WOSQLServer MySqlServer
-WOSMTPHost MySmtpServer

is that possible at all?


Yes, you just have to read these values from Java properties:

	String sqlServerHost System.getProperty("WOSQLServer");


i dont want to add this to the EOModeler.


If you want to change the connection string of your various EOF model based on such properties, I suggest the usage of com.webobjects.eoaccess.EOModelGroup.ModelAddedNotification notification using com.webobjects.foundation.NSNotificationCenter.


Also i dont want to add this argument to every Instance manual in additional
Arguments.
i know there is some standard Arguments.
My question is where can i add my own arguments as Default?


First, you can add it to the "Properties" file in the "Resources" of your project:

	WOSQLServer=foo.bar

This will set the default value for your application. Then if you want to set another value, you can set it through the "Additional Arguments" field in JavaMonitor configuration page for your application:

	Additional Arguments: -WOSQLServer "foo.bar"

or

	Additional Arguments: -DWOSQLServer=foo.bar


-- Francis Labrie Saint-Bruno-de-Montarville, Quebec, Canada _______________________________________________ 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.


References: 
 >set SQL server as Argument (From: "Sako!" <email@hidden>)

  • Prev by Date: Re: Accessing single element from NSArray of objects
  • Next by Date: Re: What class generates the sql?
  • Previous by thread: set SQL server as Argument
  • Next by thread: How to Cause validate Methods to be Called?
  • Index(es):
    • Date
    • Thread