Scott Deboy wrote:
Here are my comments:

1 - We should leave in support for configurable column names.  There
are folks out there already writing logging events to tables - and
likely using this table or tables as a common logging infrastructure
in their enterprise across systems.  Allowing JDBCAppender to write
events to existing tables is a valid  use case.  If the goal is to
provide a simple configuration, maybe we could add a
'useDefaultColumnNames' param and support those columns in the
appender by default.

2 - Is there a reason we couldn't include both and get feedback from
folks during the alpha phase as to which they prefer, or maybe Danko
and Ray could work together to combine the best parts of both
appenders into one?


I don't have a problem with the code being merged, modified, etc. as the group sees fit. The main goals for the PreparedStatementAppender that I would like preserved are 1) use PreparedStatements over Statements, 2) allow for obtaining the JDBC Connection via JNDI and 3) robustly release resources. All of these are really derived from the main directive, make it work in an application server environment.


I think it's great that we have two options and I'd like to get some
'real world' feedback on their respective benefits before we decide
to nix one or the other.

Scott


BTW, I did not receive Ceki's message below to the group. Anybody have any ideas why?


Thanks,
Ray



-----Original Message----- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Mon 4/26/2004 2:02 PM To: [EMAIL PROTECTED] Cc: Subject: PreparedStatementAppender vs. JDBCAppenderPlus


After studying both PreparedStatementAppender vs. JDBCAppenderPlus, I
would like to build on mostly PreparedStatementAppender for the
DBAppender to be included in the next version of log4j.

My preference goes to PreparedStatementAppender over JDBCAppenderPlus
 because of its simplicity although it maybe purportedly less
flexible.

I think PreparedStatementAppender could be further simplified if we
assumed fixed table columns. Is there any real advantage in allowing
variation in the column names?  We don't allow any flexibility when
using XMLLayout, why should we allow variation in the column names
when writing to a DB? Flexibility without a real-world use case does
not seem wise to me... Is there a use case where flexibility for the
table columns would make sense?

By the way, when inserting events into the database, we can ensure
that the primary key for each row is sequential. When reading from
the database, a db receiver could insert the primary key into the
properties under the key 'pkey'. This should allow us to efficiently
compare events coming from a db. (I am assuming that an event will be
inserted into a single table. Things get more complicated if one
starts playing with one-to-many relationship between an event and its
MDC and/or properties map.)




------------------------------------------------------------------------



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to