ok, I guess I figued it out. Thanks for everybody's help, esp. from Mike
McAngus.

-----Original Message-----
From: Michael Wang (IT) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 1:37 PM
To: 'Log4J Users List'
Subject: RE: Use Log4J with WebSphere


OK, I'd guess the problem could be classpath settings. Because in
websphere_stderr.log file, there is a line

log4j:ERROR No appenders could be found for category
(com.company.ejb.myBean).
log4j:ERROR Please initialize the log4j system properly.

However, in websphere_stdout.log file, looks like websphere does include
log4j.jar in its classpath.

Java Home = D:\IBM\AppServer\java\jre
Classpath =
D:/IBM/AppServer/properties;D:/IBM/AppServer/lib/bootstrap.jar;d:/IBM/AppSer
ver/lib/log4j.jar

Thanks.

Mike

-----Original Message-----
From: Bellamy, Scot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 1:43 PM
To: Log4J Users List
Subject: RE: Use Log4J with WebSphere


I don't believe that Log4J violates the EJB spec, unless you use it in
such a way that it does.  Section EJB.18.1.2 contains a list of
programming restrictions for bean providers.  In that section it states
"An enterprise bean must not use the java.io package to attempt to
access files and directories in the file system."  

I'm not sure if Webshpere allows violation of the specification or not.
There are a couple of ways to work around this, however.

1.  You can use the JDBC appender to write log information to a
database.  Since JDBC is part of the J2EE specification this is fully
complient.

2.  You can create a logging service that runs in a separate process and
utilize JMS to send messages from your EJB beans to the logging service.

Scot.


-----Original Message-----
From: Michael Wang (IT) [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 03, 2002 1:30 PM
To: 'Log4J Users List'
Subject: Use Log4J with WebSphere


I'ved asked this question before.

Now my problem is my Log4J works fine with any classes except EJB beans
class. Any idea about how to configure WebSphere 4.0?

I run my J2EE app within WebSphere for a while. Then I examine my log
output file, it has all necessary output from any java classes except
EJB beans. I vaguely remember awhile back somebody mentioned that Log4J
violates EJB spec. Do I need to configure my WebSphere 4.0 to allow
access to the file (the output is file). Thanks.


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

Reply via email to