Hi Christian,

On Tue, 31 Oct 2023 at 21:57, Christian Grobmeier <grobme...@apache.org> wrote:
> I am surprised we still have JNDI in the code at all, but this made me 
> curious:
> why do JEE users need JNDI features for logging? Why can't they just use the 
> normal log mechanism?

JNDI is basically a bean container/factory that allows Java EE
applications to retrieve database connection pools, message queues or
mail sessions (and remote code as a bonus).
For the JMS appender, JNDI is essential.
For the JDBC appender there is an alternative: DBCP2 can provide a
database connection pool via a special connection string.
The SMTP appender does not use JNDI as far as I remember.

Of course there is an alternative to JNDI also in the Java EE world
(CDI), but it doesn't work with simple servlet containers like Tomcat.

Piotr

Reply via email to