

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
10 messages in org.apache.logging.log4j-userRE: configureAndWatch| From | Sent On | Attachments |
|---|---|---|
| Lutz Michael | Jun 11, 2004 12:08 pm | |
| Ceki Gülcü | Jun 11, 2004 12:24 pm | |
| Adrian Beech | Jun 11, 2004 4:34 pm | |
| Shapira, Yoav | Jun 14, 2004 7:24 am | |
| Lutz Michael | Jun 14, 2004 8:15 am | |
| Henrik Bentel | Jun 14, 2004 8:55 pm | |
| Ceki Gülcü | Jun 15, 2004 2:19 am | |
| Ceki Gülcü | Jun 15, 2004 4:35 am | |
| Shapira, Yoav | Jun 15, 2004 6:01 am | |
| Shirish Goel | Jun 16, 2004 4:30 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: configureAndWatch | Actions... |
|---|---|---|
| From: | Henrik Bentel (hben...@comcast.net) | |
| Date: | Jun 14, 2004 8:55:42 pm | |
| List: | org.apache.logging.log4j-user | |
Not easily. According to the spec you can't create user threads. However, a lot of things are hard to achieve without stepping outside the enterprise spec.
Even Sun admits so. The idea is that resources management ( such as threads ) are hidden from the application developer. As long as code spawning threads is well encapsulated and self-managed, you can get away with it. Look at job scheduling software like Quartz or Flux. I know Quartz creates user threads and I bet Flux does too. They work because they hide all dealings with threads from the developer. So as long resources such as threads are released when the application is undeployed you'll be ok. Well managed is the keyword. So if configureAndWacht is that, then you're ok. Or you can use job scheduling like quartz to check and reload your configuration at whatever interval you'd like.
Programming enterprise java is like driving a car. Few people follow the rules exactly to the point. You might go a few miles too fast, or sneak across a yellow. But in general you follow the rules. You'll be ok. But if you drive like a madman on the run, ignoring everyone and everything you'll crash and burn.
The harder part of configureAndWatch is that it uses java.io.File to determine if a file has changed. At least in the latest version. Which can be a a bit tougher as enterprise application often are unaware of their location in a file system or does not have correct permissions to read or write to it. But that's a different headace.
-Henrik
Is there a way to achieve this functionality without spawning a thread? (just wondered if there's a work-around)
Does this also apply to the AsynAppender? (I thought maybe it uses a thread also)
Mike
-----Original Message----- From: Shapira, Yoav [mailto:Yoav...@mpi.com] Sent: Monday, June 14, 2004 10:24 AM To: Log4J Users List; a.be...@bigpond.net.au Subject: RE: configureAndWatch
Hi, Read the J2EE Specification guidelines on spawning user threads within a container to understand why. configureAndWatch spawns a thread, albeit a daemon, to watch the file.
Yoav Shapira Millennium Research Informatics
-----Original Message----- From: Adrian Beech [mailto:a.be...@bigpond.net.au] Sent: Friday, June 11, 2004 7:35 PM To: 'Log4J Users List' Subject: RE: configureAndWatch
G'day,
Could you possibly explain as to why this is so?
AB
-----Original Message----- From: Ceki Gülcü [mailto:ce...@qos.ch] Sent: Saturday, 12 June 2004 5:25 AM To: Log4J Users List Subject: Re: configureAndWatch
Hello Mike,
It is *not* OK to use configureAndWatch in a web-app.
At 09:09 PM 6/11/2004, you wrote:
Is it OK to use configureAndWatch in a Servlet?
Mike
-- Ceki Gülcü
For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: log4...@logging.apache.org For additional commands, e-mail: log4...@logging.apache.org
------------------------------------------------------------------------------- This message and any included attachments are from Siemens Medical Solutions
USA, Inc. and are intended only for the addressee(s).
The information contained herein may include trade secrets or privileged or
otherwise confidential information. Unauthorized review, forwarding, printing,
copying, distributing, or using such information is strictly prohibited and may
be unlawful. If you received this message in error, or have reason to believe
you are not authorized to receive it, please promptly delete this message and
notify the sender by e-mail with a copy to Cent...@shs.siemens.com
Thank you







