Re: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Mikolaj Rydzewski
Christopher Schultz wrote: Since you have written your own appender, maybe you could change it to fail gracefully (say, log messages to the console) when the JNDI DataSource is not available, retain a copy of a certain number of log messages (say, 100), and then write them all to the DataSource o

Re: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mikolaj, On 3/19/2009 11:04 AM, Mikolaj Rydzewski wrote: > Caldarale, Charles R wrote: >> That may be true, but there's no guarantee that your classes will be >> loaded in any specific order, nor that resources will be registered >> prior to classload

Re: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Mikolaj Rydzewski
Caldarale, Charles R wrote: That may be true, but there's no guarantee that your classes will be loaded in any specific order, nor that resources will be registered prior to classloading; the spec only indicates the resources will be available prior to any calls to the initialization methods o

RE: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Caldarale, Charles R
> From: Mikolaj Rydzewski [mailto:m...@ceti.pl] > Subject: Re: JNDI: Name java:comp is not bound in this Context > > If I'm not wrong, log4j initialization should take place during > initialization of static 'log' field. That may be true, but there's no

Re: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Mikolaj Rydzewski
Caldarale, Charles R wrote: From: Mikolaj Rydzewski [mailto:m...@ceti.pl] Subject: Re: JNDI: Name java:comp is not bound in this Context So I rather think, that Tomcat fills JNDI information after webapp deployment. Not really after, just during. I'm still looking through the

RE: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Caldarale, Charles R
> From: Mikolaj Rydzewski [mailto:m...@ceti.pl] > Subject: Re: JNDI: Name java:comp is not bound in this Context > > So I rather think, that Tomcat fills JNDI information > after webapp deployment. Not really after, just during. I'm still looking through the code, but

Re: JNDI: Name java:comp is not bound in this Context

2009-03-19 Thread Mikolaj Rydzewski
David Smith wrote: Try java:/comp instead. If that doesn't help, then we'll need more info: - OS: - where you got tomcat from (tomcat.apache.org or third party repackage) - Details of your setup like what's in tomcat's common/lib folder? - Config (relevant parts of server.xml, the webapp's con

RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
> From: Caldarale, Charles R > Subject: RE: JNDI: Name java:comp is not bound in this Context > > For all I know, a leading slash might be ignored It looks like "java:comp/env" and "java:/comp/env" are equivalent; the leading slash is indeed ignored, and the sam

Re: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread David Smith
Caldarale, Charles R wrote: >> From: David Smith [mailto:d...@cornell.edu] >> Subject: Re: JNDI: Name java:comp is not bound in this Context >> >> My copy of the spec is at work at the moment >> > > What? You use paper? > > :-) I printed ju

RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
> From: David Smith [mailto:d...@cornell.edu] > Subject: Re: JNDI: Name java:comp is not bound in this Context > > My copy of the spec is at work at the moment What? You use paper? > Someone should probably fix the docs at > http://tomcat.apache.org/tomcat-5.5-doc/jndi-d

Re: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread David Smith
Caldarale, Charles R wrote: >> From: David Smith [mailto:d...@cornell.edu] >> Subject: Re: JNDI: Name java:comp is not bound in this Context >> >> Try java:/comp instead. >> > > That's not in the spec; what is in the spec is java:comp/env,

RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
> From: David Smith [mailto:d...@cornell.edu] > Subject: Re: JNDI: Name java:comp is not bound in this Context > > Try java:/comp instead. That's not in the spec; what is in the spec is java:comp/env, so java:comp should work. - Chuck THIS COMMUNICATION MAY CONTAIN CO

Re: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread David Smith
Try java:/comp instead. If that doesn't help, then we'll need more info: - OS: - where you got tomcat from (tomcat.apache.org or third party repackage) - Details of your setup like what's in tomcat's common/lib folder? - Config (relevant parts of server.xml, the webapp's context.xml and WEB-INF/

JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Mikolaj Rydzewski
Hello everybody, I have faced interesting issue recently. Here are details: I had to implement custom log4j appender that logs particular messages to database (JDBCAppender was not enough). So I did, using JNDI based datasources, not a difficult task. Of course I updated server.xml, context.xm