db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriele Kahlout <gabri...@mysimpatico.com>
Subject Re: Hanging around derby.log, how to center it?
Date Mon, 29 Mar 2010 09:42:40 GMT
So On the first connection to derby I must create in the
derby.system.home a derby.properties that tell's it to change its
derby.system.home to dir, so that there it finds another
derby.properties with the properties I want? And I must do that for
every connection/boot.

The idea is that I don't want to write in the user working directory
(the default for derby.system.home) any .properties or .log file, but
rather in my dir.

How would you achieve this?

2010/3/29, Knut Anders Hatlen <Knut.Hatlen@sun.com>:
> On 03/26/10 11:33 PM, Gabriele Kahlout wrote:
>> Okay, so this (uncommented or commented lines):
>>
>>  final Properties prop = new java.util.Properties();
>>             prop.setProperty("derby.locks.deadlockTrace", "true");
>>             prop.setProperty("derby.stream.error.logSeverityLevel",
>> Integer.toString(20000));
>>             prop.setProperty("derby.language.logStatementText", "true");
>>             //final File log = new File(dir.getAbsolutePath() +
>> File.pathSeparator + "derby.log");
>>             //prop.setProperty("derby.stream.error.file",
>> log.getAbsolutePath());
>>             prop.store(new FileOutputStream(new File(dir,
>> "derby.properties")), "derby.properties");
>>
>> The log keeps getting created in the working directory, and also
>> nothing is written into it although I get:
>>
>
> Does the variable dir point to the current working directory? That's
> where Derby will look for derby.properties (unless the derby.system.home
> system property has been set, that is), so if it points to some other
> directory, Derby won't be able to find the derby.properties file created
> by this code.
>
> --
> Knut Anders
>


-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer
OR with " ACK" appended to this subject within 48 hours. Otherwise, I
might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a
priori senders, or if the subject of this email ends with a code, eg.
-LICHT01X, then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).

Mime
View raw message