[logback-user] DBAppender with JNDI, JTDS
steine at locustec.com
Wed Mar 21 20:00:18 CET 2012
Rest assured, I am a novice egg-sucker. At least now I know that the
dialect isn't something I need to worry about.
I figured out the problem. The 'value' here
<param name="jndiLocation" value="jdbc/MyDatabase" />
needs to be
I don't remember if that's a Tomcat thing or a JTDS thing or some other
thing entirely, but some widget I'm using says that if you define a
datasource as 'jdbc/FOO', it needs to be referenced as
Sorry for the spam!
From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch]
On Behalf Of Greg Thomas
Sent: Wednesday, March 21, 2012 1:49 PM
To: logback users list
Subject: Re: [logback-user] DBAppender with JNDI, JTDS
> I read a little about SQLDialect, but I appear to be missing the part
> that shows how to configure it, and there's no dialect for JTDS. Am I
> up the creek here, or is this possible?
It looks to me that something odd is going on. I assume you're
connecting to the same database in the end, but the DB Appender relies
(a) the JDBC driver supporting the getGeneratedKeys() method, *or*
(b) the JDBC driver one of those listed at
<http://logback.qos.ch/manual/appenders.html#DBAppender> so the record
that was inserted can be retrieved using a DB specific statement. You
can't specify the dialect - it's detected from the driver class.
[Apologies if the above is teaching you to scuk eggs]
Now, there's no dialect for JTDS, so you have to rely on the
getGeneratedKeys() method. What I don't understand is why it works with
DriverManagerConnectionSource but not JNDIConnectionSource.
This doesn't help; I started writing a more helpful email, but by the
time I finished I realised what I'd started saying was wrong!
Logback-user mailing list
Logback-user at qos.ch <mailto:Logback-user at qos.ch>
Don't gamble with your environmental information. Learn how the world's largest on-demand environmental information management system can help you mitigate your operating risk: www.locustec.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user