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 "Bellamy, Scot" <Sc...@cardinal.com> on 2002/03/20 20:07:55 UTC
Using log4j with EJB
In our environment we are using J2EE, including EJB. We would like to
employ Log4J as our logging utility for new projects. This isn't a
problem with the exception of EJB. We have identified a way to write
log messages utilizing JMS to send to a separate running process.
However, we haven't found a good way to utilize the Log4J configuration
files in EJB, since EJB code cannot utilize the java.io package. Has
anyone discovered a way to accomplish this?
Thanks,
Scot.
Re: Using log4j with EJB
Posted by Ceki Gülcü <ce...@qos.ch>.
XYZConfigurator.configureAndWatch is known to work (in single server
mode) with WebSphere 4, Weblogic 6.1, Orion and JBoss. This particular
method call violates the EJB spec on three accounts. 1) It uses
reflection. 2) It accesses a file. 3) It spawns a thread.
I find the restriction on reflection particularly unacceptable because
a lot of interesting stuff can only be done using reflection. In any
case, the section entitled "Programming Restrictions" has a lot of
impact on user code but it is particularly unclear.
At 17:56 20.03.2002 -0600, Bobby Nations wrote:
>Scot,
>
>We're using WebLogic 6.1 and having no trouble with the configureAndWatch(
>"log4j.properties" ) methods. We placed the directory holding the
>properties file into the server's classpath, and it finds it no problem.
>
>Yeah, I know, this violates the EJB spec, but hey, it works for us and we
>have no plans of switching app servers any time soon. Of course, BEA
>could always take it away from us at some point, but we'll cross that
>bridge when we get to it.
>
>Your mileage may vary,
>
>Bobby
>
>
>Bellamy, Scot wrote:
>
>>In our environment we are using J2EE, including EJB. We would like to
>>employ Log4J as our logging utility for new projects. This isn't a
>>problem with the exception of EJB. We have identified a way to write
>>log messages utilizing JMS to send to a separate running process.
>>However, we haven't found a good way to utilize the Log4J configuration
>>files in EJB, since EJB code cannot utilize the java.io package. Has
>>anyone discovered a way to accomplish this?
>>
>>
>>Thanks,
>>
>>Scot.
>>
>>
>
>--
>Sr. Programmer / Analyst
>FedEx Services
>20 FedEx Parkway
>Collierville, TN 38017
>(901) 263-6517
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using log4j with EJB
Posted by ajack <aj...@openbiz.biz>.
Same would probably work w/ EAServer, the Sybase app server, it (in
violation no doubt) allows IO access also. I guess the IO restrictions are
to allow for distribution/failover/loadbalancing --- where the file system
could "change under you" as your EJB is run on another host --- but app
server folks appear to be saying "if you want to, your call..."
regards
Adam
-----Original Message-----
From: Bobby Nations [mailto:bwnations@fedex.com]
Sent: Wednesday, March 20, 2002 4:57 PM
To: Log4J Users List
Subject: Re: Using log4j with EJB
Scot,
We're using WebLogic 6.1 and having no trouble with the
configureAndWatch( "log4j.properties" ) methods. We placed the
directory holding the properties file into the server's classpath, and
it finds it no problem.
Yeah, I know, this violates the EJB spec, but hey, it works for us and
we have no plans of switching app servers any time soon. Of course, BEA
could always take it away from us at some point, but we'll cross that
bridge when we get to it.
Your mileage may vary,
Bobby
Bellamy, Scot wrote:
>In our environment we are using J2EE, including EJB. We would like to
>employ Log4J as our logging utility for new projects. This isn't a
>problem with the exception of EJB. We have identified a way to write
>log messages utilizing JMS to send to a separate running process.
>However, we haven't found a good way to utilize the Log4J configuration
>files in EJB, since EJB code cannot utilize the java.io package. Has
>anyone discovered a way to accomplish this?
>
>
>
>Thanks,
>
>Scot.
>
>
>
>
--
Sr. Programmer / Analyst
FedEx Services
20 FedEx Parkway
Collierville, TN 38017
(901) 263-6517
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using log4j with EJB
Posted by Bobby Nations <bw...@fedex.com>.
Scot,
We're using WebLogic 6.1 and having no trouble with the
configureAndWatch( "log4j.properties" ) methods. We placed the
directory holding the properties file into the server's classpath, and
it finds it no problem.
Yeah, I know, this violates the EJB spec, but hey, it works for us and
we have no plans of switching app servers any time soon. Of course, BEA
could always take it away from us at some point, but we'll cross that
bridge when we get to it.
Your mileage may vary,
Bobby
Bellamy, Scot wrote:
>In our environment we are using J2EE, including EJB. We would like to
>employ Log4J as our logging utility for new projects. This isn't a
>problem with the exception of EJB. We have identified a way to write
>log messages utilizing JMS to send to a separate running process.
>However, we haven't found a good way to utilize the Log4J configuration
>files in EJB, since EJB code cannot utilize the java.io package. Has
>anyone discovered a way to accomplish this?
>
>
>
>Thanks,
>
>Scot.
>
>
>
>
--
Sr. Programmer / Analyst
FedEx Services
20 FedEx Parkway
Collierville, TN 38017
(901) 263-6517
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using log4j with EJB
Posted by Nate Drake <na...@evoxis.com>.
We're using the JDBCAppender by Thomas Fenner
(http://support.klopotek.de/log4j/jdbc/default.htm). This will put your log
messages into a database. It works great for us.
-----Original Message-----
From: Bellamy, Scot [mailto:Scot.Bellamy@cardinal.com]
Sent: Wednesday, March 20, 2002 2:08 PM
To: log4j-user@jakarta.apache.org
Subject: Using log4j with EJB
In our environment we are using J2EE, including EJB. We would like to
employ Log4J as our logging utility for new projects. This isn't a
problem with the exception of EJB. We have identified a way to write
log messages utilizing JMS to send to a separate running process.
However, we haven't found a good way to utilize the Log4J configuration
files in EJB, since EJB code cannot utilize the java.io package. Has
anyone discovered a way to accomplish this?
Thanks,
Scot.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>