You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Lu, David" <dl...@tiaa-cref.org> on 2002/07/29 19:40:01 UTC

Initializing Log4J in WebLogic EJB's

Is anyone initializing log4j in EJB's using a (WebLogic)startup class?

In WebLogic, if the deployment order is set to zero, the startup class will
get called prior to any other EJB deployments.

However, in my EJB class, I have something like:

public class MyEJBObject implements SessionBean{
	private static Logger logger = Logger.getLogger("asdf.dfg");
	public void ejbCreate(){...}
	...
}

Starting WebLogic will give AppenderNotFound errors because the getLogger()
method is called when the class is loaded which is before my startup class
gets called.

How does one initialize log4j (not using the default initialization
procedure) in EJB's?

Also, is there a way to turn on configureAndWatch() when using the default
initialization procedure?

Thanks!

David


**********************************************************************
This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies.  You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**********************************************************************

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>