You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Gabriele Kahlout <ga...@mysimpatico.com> on 2010/04/06 18:33:23 UTC

Re: Hanging around derby.log, how to center it?

I connect to the database via :

final Connection con =
DriverManager.getConnection("jdbc:derby:db.sqlwrapper;create=" +
false);
return con;

and I'm not sure whether the Driver is already loaded and not.
Controlling that is wanting to pain oneself.

I'd rather disable this derby.log all together, in the user
environment. Although this means missing precious logging. I'd highly
recommend an easier solution.



2010/3/29, Knut Anders Hatlen <Kn...@sun.com>:
> On 03/29/10 11:42 AM, Gabriele Kahlout wrote:
>> 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.
>>
>
> No, you can't set derby.system.home in derby.properties, see
> http://db.apache.org/derby/docs/10.5/ref/crefproper51399.html.
>
> You'll have to set derby.system.home as a system property before you
> load the Derby driver, each time you run the application, if you're not
> happy with the default.
>
>> 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?
>
> Either run the application like this:
>
>     java -Dderby.system.home=/path/to/mydir MyApp
>
> or add this call to your application before it loads the Derby driver:
>
>     System.setProperty("derby.system.home", "/path/to/mydir");
>
> --
> 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) ).