Changes for page About the Properties file
Last modified by Theodore Petrosky on 2016/06/28 12:30
From version 11.1
edited by Kieran Kelleher
on 2007/10/10 15:23
on 2007/10/10 15:23
Change comment:
There is no comment for this version
To version 12.1
edited by Kieran Kelleher
on 2007/10/10 15:47
on 2007/10/10 15:47
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -29,10 +29,46 @@ 29 29 30 30 === Configurability === 31 31 32 -Firstly, WOnder makes manyuseful settings available as Properties which are not available as simple Properties entries in traditional WebObjects applications.Some examples are:32 +Firstly, WOnder makes useful settings available as Properties which are not available out of the box as simple Properties entries in traditional WebObjects applications. 33 33 34 - {34 +For example: 35 35 36 +* EOModel connection dictionary parameters for each model 37 +* log4j configuration properties 38 +* Prototype model loading order 39 + 36 36 === User Properties === 37 37 38 38 If your user name is 'joe', then in your WebObjects application, you can create a file named Properties.joe which is read in last when joe launches his WebObjects app in his Eclipse development enviromnent. This is useful for development teams. Each team member can have properties specific to his/her own development enviromnent such as smtp server, logging properties, databasem connection dictionary settings, etc. 43 + 44 +=== Derived Properties === 45 + 46 +WOnder supports the use of @@ delimiters so that certain properties can depend on previously defined properties. 47 + 48 +{{code title="Derived Properties example"}} 49 + 50 +## Set the smtp server host one time here... and the rest get it thru 51 +#+ use of derived propertiesw calculated on the fly when loaded into System properties. 52 +app.smtpserver=mail.domain.com 53 + 54 +## WebObjects smtp host setting 55 +WOSMTPHost=@@app.smtpserver@@ 56 + 57 +## Setting for a log4j smtp appender named 'myMail' 58 +log4j.appender.myMail.SMTPHost=@@app.smtpserver@@ 59 + 60 +## Setting for Wonder's ERJavaMail framework 61 +er.javamail.smtpHost=@@app.smtpserver@@ 62 + 63 +## Setting for Sun's javamail library 64 +mail.smtp.host=@@app.smtpserver@@ 65 + 66 +{{/code}} 67 + 68 +=== Accessing properties in WOnder === 69 + 70 +Use ERXProperties static methods to get system properties from your Properties files and it offers a bunch of convenience methods to return values coerced into thyeir intended object types. It even handles arrays .... look at the source or API for ERXProperties for more details. 71 + 72 +== Conclusion == 73 + 74 +So, by simply putting aplication and logging properties into the Properties file means that all your configuration is in one place **and** each member of the development team can override those deployment settings with their own user based Properties files. Useful when they want to add DEBUG logging on stuff that other team members are not interested in.