X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.25a (ClamAV 0.103.6/26811) X-Junk-Score: 0 [] X-KAS-Score: 0 [] Return-Path: Received: from fortimail.cybercat.ca ([148.59.136.201] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.17) with ESMTPS id 29407995 for webobjects-dev@wocommunity.org; Mon, 13 Feb 2023 14:38:14 +0100 Received-SPF: none receiver=post.selbstdenker.com; client-ip=148.59.136.201; envelope-from=samuel@samkar.com Received: from smtpclient.apple (modemcable213.203-171.107.mc.videotron.ca [107.171.203.213]) (user=samuel%samkar.com mech=PLAIN bits=0) by fortimail.cybercat.ca with ESMTP id 31DDbQIi007619-31DDbQIj007619 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 13 Feb 2023 08:37:26 -0500 From: Samuel Pelletier Content-Type: multipart/alternative; boundary="Apple-Mail=_BCE8B6A8-FDB1-4168-99D0-964EB361DBA1" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: [WO-DEV] Maven: Properties not available until late in app startup sequence Date: Mon, 13 Feb 2023 08:37:41 -0500 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: <9DDA5F82-7C54-4ACC-9CA5-D981CA54F419@samkar.com> X-Mailer: Apple Mail (2.3731.400.51.1.1) X-FEAS-AUTH-USER: samuel%samkar.com --Apple-Mail=_BCE8B6A8-FDB1-4168-99D0-964EB361DBA1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Aaron, I did a quick look at properties loading and I would try this before = reading the property during your early initialization code: ERXConfigurationManager.defaultManager().loadConfiguration(); I hope this will help you! Samuel > Le 10 f=C3=A9vr. 2023 =C3=A0 09:32, Aaron Rosenzweig = a =C3=A9crit : >=20 > Hi Everyone,=20 >=20 > There is a difference in the startup processing of properties when I = launch our app in Eclipse using ANT vs Maven. Anyone know why this might = be?=20 >=20 > Our properties file has defined: = er.extensions.ERXClassDescription.factoryClass >=20 > Which is supposed to direct this call: = ERXEntityClassDescription.registerDescription() >=20 > But when it is time to register, the following returns null: = ERXProperties.stringForKey("er.extensions.ERXClassDescription.factoryClass= =E2=80=9D) >=20 > Later, such as in installPatches() or finishInitilization(), the = property has a value. So the app does find the property but not in the = early part when its really needed.=20 >=20 > I have a hunch that the order of frameworks loading is brittle and = causes this behavior. We have several apps which share a =E2=80=9Ccore=E2=80= =9D framework which is where the Properties file is stored and makes the = declaration. I think with ANT, our core framework initialized before = ERExtensions and now, with Maven, the opposite is true. I don=E2=80=99t = know this for a fact but it=E2=80=99s what I suspect.=20 >=20 > If I redeclare the property in a particular apps Properties file, then = ERXEntityClassDescription.registerDescription() can determine the = override. It=E2=80=99s a temporary workaround but it means I need to = duplicate all the properties that used to be in CORE by putting them = into each app's properties.=20 > ############################################################# > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to = > To switch to the INDEX mode, E-mail to = > Send administrative queries to = >=20 --Apple-Mail=_BCE8B6A8-FDB1-4168-99D0-964EB361DBA1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Aaron,

I did a quick look at properties loading and I = would try this before reading the property during your early = initialization code:

ERXConfigurationManager.defaultManager().loadConfiguration();

=

I hope this will help = you!

Samuel


Le 10 f=C3=A9vr. 2023 =C3=A0 09:32, Aaron = Rosenzweig <aaron@chatnbike.com> a =C3=A9crit :

Hi Everyone,

There = is a difference in the startup processing of properties when I launch = our app in Eclipse using ANT vs Maven. Anyone know why this might be? =

Our properties file has defined: = er.extensions.ERXClassDescription.factoryClass

Which is supposed = to direct this call: = ERXEntityClassDescription.registerDescription()

But when it is = time to register, the following returns null: = ERXProperties.stringForKey("er.extensions.ERXClassDescription.factoryClass= =E2=80=9D)

Later, such as in installPatches() or = finishInitilization(), the property has a value. So the app does find = the property but not in the early part when its really needed.

I = have a hunch that the order of frameworks loading is brittle and causes = this behavior. We have several apps which share a =E2=80=9Ccore=E2=80=9D = framework which is where the Properties file is stored and makes the = declaration. I think with ANT, our core framework initialized before = ERExtensions and now, with Maven, the opposite is true. I don=E2=80=99t = know this for a fact but it=E2=80=99s what I suspect.

If I = redeclare the property in a particular apps Properties file, then = ERXEntityClassDescription.registerDescription() can determine the = override. It=E2=80=99s a temporary workaround but it means I need to = duplicate all the properties that used to be in CORE by putting them = into each app's properties. =
#############################################################
This = message is sent to you because you are subscribed to
 the = mailing list <webobjects-dev@wocommunity.org>.
To unsubscribe, = E-mail to: <webobjects-dev-off@wocommunity.org>
To switch to = the DIGEST mode, E-mail to = <webobjects-dev-digest@wocommunity.org>
To switch to the INDEX = mode, E-mail to <webobjects-dev-index@wocommunity.org>
Send = administrative queries to =  <webobjects-dev-request@wocommunity.org>


= --Apple-Mail=_BCE8B6A8-FDB1-4168-99D0-964EB361DBA1--