db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Malakov" <a...@transdecisions.com>
Subject chicken and egg
Date Wed, 11 Feb 2004 22:20:45 GMT
Hello All,

Logger needs Configuration (during initialization), Configuration also needs Logger (if any
errors come up during configuration retrieval).

LoggerFactoryImpl.getLogger() uses OjbConfigurator.getInstance() which 

a) OjbConfigurator has static initializer Logger log = LoggerFactory.getBootLogger();
b) OjbConfigurator creates instance of OjbConfiguration which also has static initializizer
logger = LoggerFactory.getBootLogger();

It doesn't result in infinite loop since initializers are executed only once, but result in

 at org.apache.ojb.broker.util.logging.LoggerFactoryImpl.getLogger(LoggerFactoryImpl.java:173)
 at org.apache.ojb.broker.util.logging.LoggerFactory.getLogger(LoggerFactory.java:103)
 at org.apache.ojb.broker.accesslayer.IndirectionHandler.<clinit>(IndirectionHandler.java:86)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:141)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message