Howdy,
>Is making it 'final' a performance-related suggestion (i.e., does the
>compiler optimize anything if you do this), or practice-related (no
>reason to point the var at a new object)?
Both. For me it's more of the first.
This is a fairly simple thing to benchmark if you're curious about
Jacob Kjome wrote:
If you make them class static variables, it is the same as marking them
as transient. The recommended way to define a logger is probably
private static final Logger logger =
Logger.getLogger(MyClass.class.getName());
Is making it 'final' a performance-related suggestion
If you make them class static variables, it is the same as marking them as
transient. The recommended way to define a logger is probably
private static final Logger logger = Logger.getLogger(MyClass.class.getName());
This will not be serialized. If you don't make it static, then do...
pri
Hello -
I am a brand new log4j user so this is probably a stupid question, but is a
Logger meant to be serializable? Or should I mark Logger instance variables
in my serializable bean classes as transient? The Serializable interface
isn't on Logger.
Thanks,
---
> I was going to put the loggers into jndi so that I could gain access to
> them from within my EJBs. I know that Jboss does have built-in jboss
support
> but I am trying to keep my EJBs pure so that I would not be tied to one
app
> server (actually a constraint on my project).
Another possibili
Hi,
>but I am trying to keep my EJBs pure so that I would not be tied to one
app
>server (actually a constraint on my project). I also wanted to manage
the
>logging via mbeans. Right now I don't see any clear way to use log4j in
>enterprise beans and easily manage the logging at run time.
Here's
gt; From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 21, 2002 11:26 AM
>> To: Log4J Users List
>> Subject: Logger serializable?
>>
>>
>> Just out of curiosity - are loggers serializable? In other words, can
> they
>>
nt: Wednesday, August 21, 2002 11:26 AM
>To: Log4J Users List
>Subject: Logger serializable?
>
>
> Just out of curiosity - are loggers serializable? In other words, can
they
>be safely put into jndi? I was going to setup the loggers for my EJBs
in
>Mbeans and put
Just out of curiosity - are loggers serializable? In other words, can they
be safely put into jndi? I was going to setup the loggers for my EJBs in
Mbeans and put the loggers into jndi (using jboss).
-Ryan
--
Ryan Cuprak