Whether the code is directly in the bean or is in another class used by the bean, the problem is the same. The problem is that there will likely be multiple instances of the bean instantiated at the same time. This will cause a threading problem when attempting direct file io. The same section of the EJB spec (EJB.18.1.2) that prohibits use of the io package, also prohibits explicit thread synchronization.
The other problem is that direct file io will be a bottle-neck to your system, preventing your system from scaling as usage increases. Scot. Scot Bellamy Infrastructure & Architecture eBusiness Technology Cardinal Health, Inc. -----Original Message----- From: Steve Ebersole [mailto:[EMAIL PROTECTED]] Sent: Monday, May 27, 2002 11:31 AM To: Log4J Users List Subject: Re: Using Log4J in EJB server The direct use of the java.io package is forbidden by the EJB spec. That does not mean that your EJBs cannot use classes/libraries which use the java.io package. I use log4j in a J2EE environment with no problems (although i log to a JMS queue from within the app components). ----- Original Message ----- From: "Chris Naude" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 10:26 AM Subject: Using Log4J in EJB server > > Hi > > I have been looking at the log4j archives regarding the use of log4j inside an EJB. I am not quite sure what all the discussion is about (as usage of the java.io package is forbidden in the spec). However, I have the ff line in each of my EJB's: > > private static final Logger L = Logger.getLogger(SomeEJBClass.class); > > The EJB server I am using (Borland Enterprise Server V5.0) does not complain about anything in this regard. > > Can someone tell me if there are any hidden problems with this > approach - we have just started our project and I don't want to get any surprises later on. > > Thanks in advance. > > Chris > > > > > > > > I > > > > --------------------------------- > Sign up to watch the FIFA World Cup video highlights from your desk! > > http://fifaworldcup.yahoo.com/fc/en -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
