• 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: Best Practices - Properties files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Practices - Properties files


  • Subject: Re: Best Practices - Properties files
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 24 Jun 2009 22:17:05 -0400

As you saw u can use Properties.<username> for specific user configurations. This same feature can be used for configurations too, for example have a deployment config file named Properties.deploy and then in the WOMonitor args, simply put
-Duser.name=deploy


For sensitive passwords that you want kept out of svn repository, you can put them in WOMonitor args directly like
-DMyEOModel.password = mypassword


OR use @@ template substitution and in WOMonitor args, put this:
-Duser.name=deploy
-Dsecretpassword=mypassword

and in Properties.deploy you can use a wonder simple template format like this which does property resolving/substitution
MyEOModel.password = @@secretpassword@@


For *most* properties, see the file ERExtensions/Resources/Properties. In fact the Resources/Properties file of each Wonder framework usually documents the Properties that can be configured. Also a new Wonder project in WOLips will usually have recommended property settings. Browsing the source code of Wonder can sometimes lead you to discover configurable properties that are not documented anywhere too.

Deployment scripts generally take the split tar.gz's created by the standard build.xml and scp them to a remote server using ssh where dsa public/private keypairs remove the need to enter passwords. Then the copied tar.gz's can be copied from one remote machine to all other WO servers in the cluster and inflated and permissions can be set.


Tim, I am sure there are other ways too to skin the cat.

HTH, Kieran

On Jun 24, 2009, at 9:59 PM, Tim Worman wrote:

All:

context: I've been wanting to start some threads on simple best practices and maybe get involved in helping with the wiki. From my own work, this seemed as good a place to start as any.

--------------

I have a project that is pretty recently moved to Wonder. From searching list posting and blogs I have seen mentions of different configurations of Properties files that Wonder will discover and use for database connection stuff, etc. Some of them I hadn't seen mention of elsewhere.

I've recently started using Properties.<username> for doing dev work and keeping passwords in there (and away from my code repository). However, I've also recently seen whisper of a Properties.dev.

Two things I'd like to see:

1. a full concise list of what all the possible Properties files (requiring Wonder or not) and also how the more experienced among us leverage them. If it turns out there are some that don't have great documentation I'll volunteer to update the wiki!!

2. It still seems to me that another Properties file must be inserted at deployment for different db passwords, etc. How do the veterans among handle this? I've seen some deployment scripts around but haven't dug into that stuff yet. I still build very locally and deploy very manually (scp). :-)

Tim
UCLA GSE&IS
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Best Practices - Properties files
      • From: Mike Schrag <email@hidden>
    • Re: Best Practices - Properties files
      • From: Jacob Fisher <email@hidden>
    • Re: Best Practices - Properties files
      • From: Freddie Tilley <email@hidden>
    • Re: Best Practices - Properties files
      • From: Tim Worman <email@hidden>
References: 
 >Best Practices - Properties files (From: Tim Worman <email@hidden>)

  • Prev by Date: Re: Entity Modeler and Filemaker
  • Next by Date: [OT] WOLips - Eclipse compatibility?
  • Previous by thread: Best Practices - Properties files
  • Next by thread: Re: Best Practices - Properties files
  • Index(es):
    • Date
    • Thread