This is the Project Wonder Properties magic. See Kieran's presentation at WOWODC 2010.
Properties.username is only for development and Eclipse. Best practices in a team environment would be that you would add Properties.username to the ignore list of version control. Originally, I had everything in Properties of the Project/Resources wrapper, but then how do you deal with the same project tar ball for System Test and Production? The answer is to use the /etc/WebObject/[InstanceName]/Properties file. The content of this file will override the content of the Project/Resource/Properties file. So you can have a Properties file for System Test and a separate one for Production. Once set then you basically never have to worry about them again. Paul On Sep 28, 2011, at 8:04 AM, Theodore Petrosky wrote: > Paul, > > I have tried to understand this last part. So, to reiterate: > > 1. you have a Poperties.username file in your project and you put your > connection dictionary information there to be used durning production. > > 2. on your production server you use a property file at: > /etc/WebObjects/AppInstanceName/Properties > > Is this a path name that you have created manually? > > Why? I experimented with the Properties.username and it works fine. Enquiring > minds want to know why! i don't see what I get for the (albeit minor) extra > step. > > Ted > > --- On Mon, 9/26/11, Paul Yu <[email protected]> wrote: > >> From: Paul Yu <[email protected]> >> Subject: Re: creating first framework >> To: "David Holt" <[email protected]> >> Cc: "Theodore Petrosky" <[email protected]>, [email protected] >> Date: Monday, September 26, 2011, 12:49 PM >> I've learned to set the connection >> dictionary in the Properties.[myUsername] file of the >> Application not the model framework for development. >> Then in production or test environments, set them in >> /etc/WebObjects/AppInstanceName/Properties file. >> >> Paul >> On Sep 26, 2011, at 11:46 AM, David Holt wrote: >> >>> >>> On 2011-09-26, at 3:28 AM, Theodore Petrosky wrote: >>> >>>> thanks Paul and George, >>>> >>>> So here are my steps based on information gleaned >> from your replies. >>>> >>>> 1. Create new Wonder Framework. This framework is >> special in that it contains no Application nor DirectAction >> nor Session java classes. >>>> >>>> 2. Add a .eomodeld file for the database. if using >> the properties file, set up the migrations and database >> connection dictionary. >>> >>> I don't add a connection dictionary at the framework >> level. I always do it at the application level. I think this >> is because all of the examples in Wonder do it this way, so >> it must be right :-) >>> >>> d >>> >>>> >>>> 3. Run EOGenerate (this creates the your.app.model >> structure) >>>> >>>> 4. Create the Migrations >>>> >>>> This completes the Framework and it is a project >> in Eclipse. >>>> >>>> 1. Create a new Wonder Project. >>>> 2. RIght click the project name and Configure the >> build path. The new framework shows up in Add Library, >> Webobject Library (This one caused me a little problem as >> Paul referred to it as: >>>>> Then just put the >>>>> Framework on your Application project's >> classpath. >>>> >>>> Obviously, there was a divergence somewhere and >> paul refers to it as the classpath and eclipse refers to it >> as the build path. But for a neophyte like me, I was >> confused. >>>> >>>> But Voila, it works beautifully. >>>> >>>> Thanks again. >>>> >>>> Ted >>>> >>>> >>>> >>>> --- On Sun, 9/25/11, Paul D Yu <[email protected]> >> wrote: >>>> >>>>> From: Paul D Yu <[email protected]> >>>>> Subject: Re: creating first framework >>>>> To: "Theodore Petrosky" <[email protected]> >>>>> Date: Sunday, September 25, 2011, 6:49 PM >>>>> Ted >>>>> >>>>> Here's the simple ModelFramework that I >> created for my >>>>> Fluffy Bunny presentation. >>>>> >>>>> Should give you the pattern. Then just >> put the >>>>> Framework on your Application project's >> classpath. >>>>> Then when you embed the frameworks I believe >> it will just be >>>>> copied into the Application tar ball. >>>>> >>>>> Paul >>>>> >>>>> On Sep 25, 2011, at 6:17 PM, Theodore Petrosky >> wrote: >>>>> >>>>>> >>>>>> 1. Create a new framework project >>>>>> >>>>>> ok >>>>>> >>>>>> 2. add the framework to the build path of >> your primary >>>>> project. >>>>>> >>>>>> a framework doesn't need to be compiled? >> what about >>>>> the references to the .eomodeld file >>>>>> >>>>>> the attributes class reference >>>>> com.something.model.EOClass and what about the >> .eogen file? >>>>>> >>>>>> My goal is to create a framework that has >> only the >>>>> eomodeld and eogen so I can create multiple >> apps that >>>>> reference this one .eomodeld and only modify >> the one >>>>> eomodeld file and the migrations in the >> framework. >>>>>> >>>>>> >>>>>> Ted >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> --- On Sun, 9/25/11, George Domurot <[email protected]> >>>>> wrote: >>>>>> >>>>>>> From: George Domurot <[email protected]> >>>>>>> Subject: Re: creating first framework >>>>>>> To: "Theodore Petrosky" <[email protected]> >>>>>>> Cc: [email protected] >>>>>>> Date: Sunday, September 25, 2011, >> 11:29 AM >>>>>>> Hi Ted, >>>>>>> >>>>>>> Frameworks are pretty straight >> forward. >>>>> Create a new >>>>>>> framework project, then add the >> framework to the >>>>> build path >>>>>>> of your primary project. >>>>>>> >>>>>>> Then try a test. Add a class to >> your >>>>> framework and >>>>>>> use it in your project. >>>>>>> >>>>>>> -G >>>>>>> >>>>>>> On Sep 25, 2011, at 8:15 AM, Theodore >> Petrosky >>>>> wrote: >>>>>>> >>>>>>>> I have a Wonder project that is >> growing. >>>>>>>> >>>>>>>> I want to create a framework that >> includes >>>>> the >>>>>>> migrations and EOModel. Problem is I >> have never >>>>> created a >>>>>>> framework and I don't understand the >> process. >>>>>>>> >>>>>>>> I checked the examples and as best >> I could >>>>> the >>>>>>> multitude of tutorials that exist to >> no avail. >>>>>>>> >>>>>>>> I don't know where to start. >>>>>>>> >>>>>>>> Ted >>>>>>>> >>>>> >> _______________________________________________ >>>>>>>> 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/george%40boxofficetickets.com >>>>>>>> >>>>>>>> This email sent to [email protected] >>>>>>> >>>>>>> >>>>>> >> _______________________________________________ >>>>>> 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/pyu%40mac.com >>>>>> >>>>>> This email sent to [email protected] >>>>> >>>>> >>>> _______________________________________________ >>>> 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/programmingosx%40mac.com >>>> >>>> This email sent to [email protected] >>> >>> _______________________________________________ >>> 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/pyu%40mac.com >>> >>> This email sent to [email protected] >> >> _______________________________________________ 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]
