db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject Re: Is there some way an external class can find where derby.system.home points to
Date Wed, 11 Sep 2013 00:43:28 GMT
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 make Derby a self maintaining system
especially when being run in Network Server mode.

On Sep 6, 2013, at 4:59 PM, Katherine Marsden <kmarsdenderby@sbcglobal.net> wrote:

> On 9/6/2013 5:35 AM, Bergquist, Brett wrote:
>> I finally broke down and wrote RollingFileStream which provides (and borrows) most
of the functionality of java.logger.FileHandler to provide a rolling file stream.   Having
derby.log grow forever on long running systems is just not acceptable anymore ;)   Realistically,
I would like to provide this 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.method"
or "derby.stream.error.field", but no good implementation of such.
>> 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.   Create and
installing my own security policy is also a bit of a pain as the network server is started
by Glassfish and there really is not much opportunity to pass startup parameters.
>> 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 
> the property user.dir. That said, I think it would be good to 
> incorporate this functionality into the core product and then the 
> properties could go into derby.properties.  It seems to me there was a 
> Jira issue for this, but I can't find it right now.
>> How about a proposal that "derby.stream.error.field" can point to a static method
that can take 0 or 1 parameters and if one parameter, it is passed 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 the method that takes 0 parameters and if not found, retry with finding
the method that takes one string parameter?
>> Brett

View raw message