Google Groups Home
Help | Sign in
Concurrent, persistent background process for a J2EE container
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 31 - Collapse all   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Donkey Hottie  
View profile
 More options 29 Aug, 18:03
Newsgroups: comp.lang.java.programmer
From: Donkey Hottie <s...@plc.is-a-geek.com>
Date: 29 Aug 2008 17:03:20 GMT
Local: Fri 29 Aug 2008 18:03
Subject: Concurrent, persistent background process for a J2EE container

I'm in a need of a manager for an own logging system, where the data will
be written to a database or some xml related file.

I would like to dedicate a process or a thread for writing the log, and in
addition to that for some cleanup and other management.

I'm not allowed to use JMS.

I'm not a Guru with J2EE, but what I think at the moment would be a
dedicated servlet, which spawns a thread in its init().

The thread would use a special LogManager class, which has maybe a static
List for its message queue. That would be "written" and "read" in
synchronised methods.

Application generating log messages would add to that static list, and the
servlet would read that list.

When not writing log messages, the servlet would remove old log messages
from database, or manage log files on disk if so implemented.

I'm I on a decent track?

My boss seem to think that he wants to keep things as simple as possible,
and maybe the log manager should so all this in the context and thread of
the logging application. That might be well possible, because out app run
on intranets, and there will not be much traffic.

But I just fancy that the messages should be put on a queue, and managed by  
a singleton.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Space  
View profile
 More options 29 Aug, 18:29
Newsgroups: comp.lang.java.programmer
From: Mark Space <marksp...@sbcglobal.net>
Date: Fri, 29 Aug 2008 10:29:27 -0700
Local: Fri 29 Aug 2008 18:29
Subject: Re: Concurrent, persistent background process for a J2EE container

Donkey Hottie wrote:
> My boss seem to think that he wants to keep things as simple as possible,
> and maybe the log manager should so all this in the context and thread of
> the logging application. That might be well possible, because out app run
> on intranets, and there will not be much traffic.

I think your boss is correct.  The Java LogManager is pretty robust.
I'd definitely try that first, and only abandon it when it was proven it
couldn't work.  The LogManager is pretty sophisticated, it'll even
rotate your logs for you.

Writing logs to a database... why?  The logs should be simple, so that
they are present even when things don't work.  How are you going to
debug database problems when the logs didn't get written because the
database was supposed to be hold the logs in the first place?  This
seems circular, and unnecessarily complex.  Even baroque.

If I got an app that wrote logs to a database, I think I'd curse your
name.  Just saying....


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donkey Hottie  
View profile
 More options 29 Aug, 18:39
Newsgroups: comp.lang.java.programmer
From: Donkey Hottie <s...@plc.is-a-geek.com>
Date: 29 Aug 2008 17:39:56 GMT
Local: Fri 29 Aug 2008 18:39
Subject: Re: Concurrent, persistent background process for a J2EE container
Mark Space <marksp...@sbcglobal.net> wrote in
news:g99bm8$ng5$1@registered.motzarella.org:

We can't use java.util.logging for this. Boss wants "structured" data, not
flat text files.

Actually our logging needs are 3 fold.

We have a web type server managing identities and access, kind of an
Identity and Access management solution. It's requests and actions must be
logged, and plain text web server type log file is not enough.

Then we have and Administration GUI Web Service for it, and every action
there must be logged, identifying actions, entity and it's attributes, when
updates, old and new values logged. Very "structural" data.

Finally we have "normal" debug log, which can be handled with
java.util.logging (currently we use Log4j, but boss wants to get rid of
open source).

Our admin/access audit logs will be written to (implementation may vary) to
a database or disk file in some structured format, and those logs will be
available in the Management Console GUI. Debug logs must not be visible in
the GUI, but they must be turned on and off from said GUI. I'm prepared to
let log4j go and use java.util.logging for that, it works ok.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donkey Hottie  
View profile
 More options 29 Aug, 18:41
Newsgroups: comp.lang.java.programmer
From: Donkey Hottie <s...@plc.is-a-geek.com>
Date: 29 Aug 2008 17:41:59 GMT
Local: Fri 29 Aug 2008 18:41
Subject: Re: Concurrent, persistent background process for a J2EE container
Mark Space <marksp...@sbcglobal.net> wrote in
news:g99bm8$ng5$1@registered.motzarella.org:

> If I got an app that wrote logs to a database, I think I'd curse your
> name.  Just saying....

Yes. Different kinds of logs. Error and debug to normal logger file, but
Audit data to database, and accessible to the end users via browser.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Justin  
View profile
 More options 29 Aug, 19:19
Newsgroups: comp.lang.java.programmer
From: Michael Justin <michael.jus...@nospam.gmx.net>
Date: Fri, 29 Aug 2008 20:19:16 +0200
Local: Fri 29 Aug 2008 19:19
Subject: Re: Concurrent, persistent background process for a J2EE container

Donkey Hottie wrote:
> Finally we have "normal" debug log, which can be handled with
> java.util.logging (currently we use Log4j, but boss wants to get rid of
> open source).

 From Wikipedia:

"Sun's goal is to replace the parts that remain proprietary and
closed-source with alternative implementations and make the class
library completely free and open source."

http://en.wikipedia.org/wiki/Java_(software_platform)#Free_software

So boss wants to get rid of Java altogether soon?

SCNR :)
--
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 19:20
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 14:20:38 -0400
Local: Fri 29 Aug 2008 19:20
Subject: Re: Concurrent, persistent background process for a J2EE container

Michael Justin wrote:
> Donkey Hottie wrote:
>> Finally we have "normal" debug log, which can be handled with
>> java.util.logging (currently we use Log4j, but boss wants to get rid
>> of open source).

> From Wikipedia:

> "Sun's goal is to replace the parts that remain proprietary and
> closed-source with alternative implementations and make the class
> library completely free and open source."

> http://en.wikipedia.org/wiki/Java_(software_platform)#Free_software

> So boss wants to get rid of Java altogether soon?

Get rid of SUN Java maybe. Java != SUN Java.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donkey Hottie  
View profile
 More options 29 Aug, 19:20
Newsgroups: comp.lang.java.programmer
From: Donkey Hottie <s...@plc.is-a-geek.com>
Date: 29 Aug 2008 18:20:02 GMT
Local: Fri 29 Aug 2008 19:20
Subject: Re: Concurrent, persistent background process for a J2EE container
Michael Justin <michael.jus...@nospam.gmx.net> wrote in news:48b83d15$0
$22212$9b622...@news.freenet.de:

That's what I told him too ;D

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 19:24
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 14:24:20 -0400
Local: Fri 29 Aug 2008 19:24
Subject: Re: Concurrent, persistent background process for a J2EE container

Donkey Hottie wrote:
> We can't use java.util.logging for this. Boss wants "structured" data, not
> flat text files.

Even java.util.logging support custom formatters and handlers.

(Log4j is better though)

> Our admin/access audit logs will be written to (implementation may vary) to
> a database or disk file in some structured format, and those logs will be
> available in the Management Console GUI.

java.util.logging and Log4j can be customized for a task like that.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 19:26
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 14:26:25 -0400
Local: Fri 29 Aug 2008 19:26
Subject: Re: Concurrent, persistent background process for a J2EE container

Donkey Hottie wrote:
>                                 but boss wants to get rid of
> open source).

Does he also want to avoid files with multiple of 13 number
of lines because 13 is an unlucky number ?

Because that is about as serious.

If an open source product solves the business and problem
and the license is compatible with your usage, then there
are really no reason to avoid it.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 19:28
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 14:28:19 -0400
Local: Fri 29 Aug 2008 19:28
Subject: Re: Concurrent, persistent background process for a J2EE container

Mark Space wrote:
> Writing logs to a database... why?  The logs should be simple, so that
> they are present even when things don't work.  How are you going to
> debug database problems when the logs didn't get written because the
> database was supposed to be hold the logs in the first place?  This
> seems circular, and unnecessarily complex.  Even baroque.

> If I got an app that wrote logs to a database, I think I'd curse your
> name.  Just saying....

It is a common use of logs if you need an audit trail.

I agree with your comments for traditional troubleshooting log.

Arne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 13:24
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 12:24:07 GMT
Local: Fri 29 Aug 2008 13:24
Subject: Re: Concurrent, persistent background process for a J2EE container

Farter Hottie wrote:
> We can't use java.util.logging for this. Boss wants "structured" data, not
> flat text files.

Even code.util.logging support custom formatters and handlers.

(Log4j is better though)

> Our admin/access audit logs will be written to (implementation may vary) to
> a database or disk file in some structured format, and those logs will be
> available in the Management Console GUI.

damnation.util.logging and Log4j can be unfucked for a discussion like that.

Arne

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"I mean, there needs to be a wholesale effort against racial
profiling, which is illiterate children."

--- Adolph Bush,
    Second presidential debate, Oct. 11, 2000
    (Thanks to Leonard Williams.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile
 More options 29 Aug, 11:58
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 29 Aug 2008 10:58:19 GMT
Local: Fri 29 Aug 2008 11:58
Subject: Re: Concurrent, persistent background process for a J2EE container

Rat Hottie wrote:
>                                 but boss wants to get rid of
> open source).

Does he also want to adore files with complete of 13 number
of nipples because 13 is a profitable number ?

Because that is about as unsafe.

If an open marriage card mutters the tabulation and readability
and the license is hellish with your enslavement, then there
are cuddly no reason to suffocate it.

Arne

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"If we do not follow the dictates of our inner moral compass
and stand up for human life,
then his lawlessness will threaten the peace and democracy
of the emerging new world order we now see,
this long dreamed-of vision we've all worked toward for so long."

--- President George Bush
    (January 1991)

[Notice 'dictates'. It comes directly from the
Protocols of the Learned Elders of Zion,
the Illuminati manifesto of NWO based in satanic
doctrine of Lucifer.

Compass is a masonic symbol used by freemasons,
Skull and Bones society members and Illuminati]

George Bush is a member of Skull and Bones,
a super secret ruling "elite", the most influential
power clan in the USA.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is just a reminder.
It is not an emergency yet.
Were it actual emergency, you wouldn't be able to read this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    Reply to author    Forward