Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD58010CC7 for ; Wed, 11 Sep 2013 00:44:00 +0000 (UTC) Received: (qmail 90914 invoked by uid 500); 11 Sep 2013 00:44:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90896 invoked by uid 500); 11 Sep 2013 00:44:00 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 90889 invoked by uid 99); 11 Sep 2013 00:44:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2013 00:44:00 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [207.46.163.26] (HELO co9outboundpool.messaging.microsoft.com) (207.46.163.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2013 00:43:52 +0000 Received: from mail193-co9-R.bigfish.com (10.236.132.244) by CO9EHSOBE015.bigfish.com (10.236.130.78) with Microsoft SMTP Server id 14.1.225.22; Wed, 11 Sep 2013 00:43:31 +0000 Received: from mail193-co9 (localhost [127.0.0.1]) by mail193-co9-R.bigfish.com (Postfix) with ESMTP id 77A67420202 for ; Wed, 11 Sep 2013 00:43:31 +0000 (UTC) X-Forefront-Antispam-Report: CIP:74.62.37.82;KIP:(null);UIP:(null);IPV:NLI;H:CPHUB1.canoga.com;RD:rrcs-74-62-37-82.west.biz.rr.com;EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zzbb2dI98dI9371I1432I604Idb82hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1f8fizz8275ch1de098h1de097hz2dh2a8h839h947hd25he5bhf0ah1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1fe8h1ff5h2052h20b3m1155h) Received: from mail193-co9 (localhost.localdomain [127.0.0.1]) by mail193-co9 (MessageSwitch) id 1378860210271978_30370; Wed, 11 Sep 2013 00:43:30 +0000 (UTC) Received: from CO9EHSMHS010.bigfish.com (unknown [10.236.132.236]) by mail193-co9.bigfish.com (Postfix) with ESMTP id 344B6200040 for ; Wed, 11 Sep 2013 00:43:30 +0000 (UTC) Received: from CPHUB1.canoga.com (74.62.37.82) by CO9EHSMHS010.bigfish.com (10.236.130.20) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 11 Sep 2013 00:43:29 +0000 Received: from CPHUB2.canoga.com (172.16.1.94) by CPHUB1.canoga.com (172.16.1.93) with Microsoft SMTP Server (TLS) id 8.2.213.0; Tue, 10 Sep 2013 17:43:02 -0700 Received: from vserver1.canoga.com ([169.254.2.48]) by CPHUB2.canoga.com ([172.16.1.94]) with mapi; Tue, 10 Sep 2013 17:43:02 -0700 From: "Bergquist, Brett" To: "derby-dev@db.apache.org" Date: Tue, 10 Sep 2013 17:43:28 -0700 Subject: Re: Is there some way an external class can find where derby.system.home points to Thread-Topic: Is there some way an external class can find where derby.system.home points to Thread-Index: Ac6uh98JltESEunnS96pesEKGr0cSg== Message-ID: References: <3879C6FF-8E01-43E5-9DAA-909706B6AE2E@canoga.com> <522A4229.7050908@sbcglobal.net> In-Reply-To: <522A4229.7050908@sbcglobal.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-TM-AS-Product-Ver: SMEX-10.2.0.3176-7.000.1014-20138.005 X-TM-AS-Result: No--13.817900-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: canoga.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-Virus-Checked: Checked by ClamAV on apache.org I will open a JIRA for this Kathy and then try to get a patch together. I = agree this should be part of the core of Derby as it really is needed to ma= ke Derby a self maintaining system especially when being run in Network Ser= ver mode. On Sep 6, 2013, at 4:59 PM, Katherine Marsden = wrote: > On 9/6/2013 5:35 AM, Bergquist, Brett wrote: >> I finally broke down and wrote RollingFileStream which provides (and bor= rows) most of the functionality of java.logger.FileHandler to provide a rol= ling file stream. Having derby.log grow forever on long running systems i= s just not acceptable anymore ;) Realistically, I would like to provide t= his back to the derby community somehow as I found many requests for such a= feature while searching and many references to using "derby.stream.error.m= ethod" or "derby.stream.error.field", but no good implementation of such. >>=20 >> I built a DerbyUtil.jar which the class along with a configurator class = which can read a "derbylog.properties" file for configuration information. = I would like to locate this file at the same place as "derby.properties" = so the configurator needs to find out what "derby.system.home" is set to. = Because of the default security policy installed by the network server and= because my DerbyUtil.jar is separate, it cannot access the property. Cre= ate and installing my own security policy is also a bit of a pain as the ne= twork server is started by Glassfish and there really is not much opportuni= ty to pass startup parameters. >>=20 >> So is there someway to locate the location that "derby.ssystem.home" is= pointing to in my class that is being invoke by "derby.stream.error.field"= ? > You can read the system property derby.system.home and if not set use=20 > the property user.dir. That said, I think it would be good to=20 > incorporate this functionality into the core product and then the=20 > properties could go into derby.properties. It seems to me there was a=20 > Jira issue for this, but I can't find it right now. >>=20 >> How about a proposal that "derby.stream.error.field" can point to a stat= ic method that can take 0 or 1 parameters and if one parameter, it is passe= d the value of "derby.system.home" as a String. This seems to be a simple = change and could easily be accommodated by first using reflection to find t= he method that takes 0 parameters and if not found, retry with finding the = method that takes one string parameter? >>=20 >> Brett >>=20 >=20 >=20