wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJB Passivation Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB Passivation Question" Watch "EJB Passivation Question" New topic
Author

EJB Passivation Question

Bradley Rintoul
Greenhorn

Joined: Apr 01, 2003
Posts: 14
Hello. Quick question about "best practices" here, maybe...

So, I have a stateful session bean that is using a Logger (org.apache.log4j style). I was keeping a reference to it as a member variable, but then realized it is unserializable... Should I just make calls to Logger.getLogger() all the time? Is this expensive?

Thanks for any advice/help.

B.
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Make your logger member variable static.

Thanks,


Amit Tank
Linked In
Bradley Rintoul
Greenhorn

Joined: Apr 01, 2003
Posts: 14
Originally posted by Amit M Tank:
Make your logger member variable static.


Now why didn't I think of that?!?

 
jQuery in Action, 2nd edition
 
subject: EJB Passivation Question
 
Similar Threads
Doubt on EL
byte range...
I Was Unable To Do The Drag and Drop Question At The Exam
fname ???
this below gives 192.168.10.2 well in which case this gives 127.0.0.1