You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Adrian Pitulac <ad...@idsys.ro> on 2006/08/09 00:18:59 UTC
Expert help needed for logging in a JavaEE application with Log4j...
Hello,
I'm new to Log4j and large scale enterprise applications and i need some
clarifications on log4j.... i've read lots of docs and the forums around
but have not found a full answer yet..
I have a big application to build on JavaEE and we have preselected Sun
Application Server 9 as a good solution for deployment. The application
consists of lots of stateless, stateful and message driven beans.
I want to use Log4j as the logging framework for this project. One of
the features i want to use without any other discussions is the xml
configuration for log4j. But due to the restrictions imposed by
JavaEE/EJB specifications i cannot use any java.io class in my beans.
So it remains as an good option to run a client on the server
machine(the one which hosts the application server) which will pass as a
stream the xml config. Here comes the tricky part. One of our
requirement is that the javaEE application has to be fully clusterable.
My questions are:
1. Is the streamable xml config a good way of configuring log4j in
ejb's? what other solutions are there besides initializing log4j in a
servlet?
2. Are the Logger static class instances from two session beans working
on the same hierarchy? If not do we have to configure them separately?
3. How will an application server behave in a clustered environment? Are
there any other tips we should know about?
I'll be very happy if i'll receive some answers here.. So i want to
thank in advance people who could help me.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
RE: Expert help needed for logging in a JavaEE application with Log4j...
Posted by "Harp, George" <GH...@GAINSystems.com>.
You'll have to do the leg work yourself .. .I am familiar with Jboss'
JMX and mx4j (cruisecontrol).
Hopefully sun has an initialization file you can modify to load your
Mbean. Sun has a tutorial on JMX is the place I would start. It might
sound complicated but it is simplier than the current ejb(not ejb3), so
I am sure you can figure it out. Maybe search their J2ee site for JMX
and find examples.
-----Original Message-----
From: Adrian Pitulac [mailto:adrian@idsys.ro]
Sent: Tuesday, August 08, 2006 6:48 PM
To: Log4J Users List
Subject: Re: Expert help needed for logging in a JavaEE application with
Log4j...
Your very kind George,
I'm glad you can help me a little,
I've looked at Jboss at the beginning but i've went away due to the ejb3
implementation which is not done yet (only in RC8 i think). And after
some problems with timers in JBoss.
My decision for going with Sun si not a final one - i might go back to
jboss And yes.. Sun App Server has JMX implementation.. but i have to
admit that i have no experience with it.. nor with MBean... but from
what i've seen Sun's app server supports it.
If you could give me some more info i'd be grateful.
Thanks..
Harp, George wrote:
> Does it have a JMX implementation? If it does you could pass in xml
> file and configure that way perhaps.
> You would have to get the MBEan to load first, that could be a hassle,
> but you asked for more suggestions in light of no apparent way to
> initialize Log4j. Have you looked at the other open source J2EE
> implementations? JBoss, Spring and I think Apache has one also. Not
> sure of status of ejb3 on all but JBoss( I've used it it is nicer than
> regualr ejb).
> Also, JBoss has .ear files to deploy applications maybe sun has
> something simular, the issue would be how soon could you use it to
> initialize log4j (like the Mbean). Maybe send links you found for
> log4j maybe pps could help you decipher?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Expert help needed for logging in a JavaEE application with Log4j...
Posted by Adrian Pitulac <ad...@idsys.ro>.
Your very kind George,
I'm glad you can help me a little,
I've looked at Jboss at the beginning but i've went away due to the ejb3
implementation which is not done yet (only in RC8 i think). And after
some problems with timers in JBoss.
My decision for going with Sun si not a final one - i might go back to
jboss And yes.. Sun App Server has JMX implementation.. but i have to
admit that i have no experience with it.. nor with MBean... but from
what i've seen Sun's app server supports it.
If you could give me some more info i'd be grateful.
Thanks..
Harp, George wrote:
> Does it have a JMX implementation? If it does you could pass in xml file
> and configure that way perhaps.
> You would have to get the MBEan to load first, that could be a hassle,
> but you asked for more suggestions in light of no apparent way to
> initialize Log4j. Have you looked at the other open source J2EE
> implementations? JBoss, Spring and I think Apache has one also. Not sure
> of status of ejb3 on all but JBoss( I've used it it is nicer than
> regualr ejb).
> Also, JBoss has .ear files to deploy applications maybe sun has
> something simular, the issue would be how soon could you use it to
> initialize log4j (like the Mbean). Maybe send links you found for log4j
> maybe pps could help you decipher?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
RE: Expert help needed for logging in a JavaEE application with Log4j...
Posted by "Harp, George" <GH...@GAINSystems.com>.
Does it have a JMX implementation? If it does you could pass in xml file
and configure that way perhaps.
You would have to get the MBEan to load first, that could be a hassle,
but you asked for more suggestions in light of no apparent way to
initialize Log4j. Have you looked at the other open source J2EE
implementations? JBoss, Spring and I think Apache has one also. Not sure
of status of ejb3 on all but JBoss( I've used it it is nicer than
regualr ejb).
Also, JBoss has .ear files to deploy applications maybe sun has
something simular, the issue would be how soon could you use it to
initialize log4j (like the Mbean). Maybe send links you found for log4j
maybe pps could help you decipher?
-----Original Message-----
From: Adrian Pitulac [mailto:adrian@idsys.ro]
Sent: Tuesday, August 08, 2006 5:49 PM
To: Log4J Users List
Subject: Re: Expert help needed for logging in a JavaEE application with
Log4j...
You could be right here but Sun Application Server 9 PE (also known as
GLASSFISH) uses the Logging API specified in JSR 047. Searching the
forums/mailing lists i've found many reply's redirecting the log4j
interested users to the Logging API.
There are very few resources regarding Log4j in the Glassfish comunity.
I've checked the administration guide, developer's manual, deployment
guide for Glassfish and haven't found anything related to configuration
files for third party frameworks...
Thanks.. i expect other suggestions also....
Harp, George wrote:
> You may want to check the J2EE server you are examining.
> I know JBoss has a separate directory to congigure things like log4j
> DataSources etc, perhaps Sun's implementation does also?
>
> -----Original Message-----
> From: Adrian Pitulac [mailto:adrian@idsys.ro]
> Sent: Tuesday, August 08, 2006 5:19 PM
> To: log4j-user@logging.apache.org
> Subject: Expert help needed for logging in a JavaEE application with
> Log4j...
>
> Hello,
>
> I'm new to Log4j and large scale enterprise applications and i need
> some clarifications on log4j.... i've read lots of docs and the forums
> around but have not found a full answer yet..
> I have a big application to build on JavaEE and we have preselected
> Sun Application Server 9 as a good solution for deployment. The
> application consists of lots of stateless, stateful and message driven
beans.
> I want to use Log4j as the logging framework for this project. One of
> the features i want to use without any other discussions is the xml
> configuration for log4j. But due to the restrictions imposed by
> JavaEE/EJB specifications i cannot use any java.io class in my beans.
> So it remains as an good option to run a client on the server
> machine(the one which hosts the application server) which will pass as
> a stream the xml config. Here comes the tricky part. One of our
> requirement is that the javaEE application has to be fully
clusterable.
>
> My questions are:
> 1. Is the streamable xml config a good way of configuring log4j in
> ejb's? what other solutions are there besides initializing log4j in a
> servlet?
> 2. Are the Logger static class instances from two session beans
> working on the same hierarchy? If not do we have to configure them
separately?
> 3. How will an application server behave in a clustered environment?
> Are there any other tips we should know about?
>
> I'll be very happy if i'll receive some answers here.. So i want to
> thank in advance people who could help me.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Expert help needed for logging in a JavaEE application with Log4j...
Posted by Adrian Pitulac <ad...@idsys.ro>.
You could be right here but Sun Application Server 9 PE (also known as
GLASSFISH) uses the Logging API specified in JSR 047. Searching the
forums/mailing lists i've found many reply's redirecting the log4j
interested users to the Logging API.
There are very few resources regarding Log4j in the Glassfish comunity.
I've checked the administration guide, developer's manual, deployment
guide for Glassfish and haven't found anything related to configuration
files for third party frameworks...
Thanks.. i expect other suggestions also....
Harp, George wrote:
> You may want to check the J2EE server you are examining.
> I know JBoss has a separate directory to congigure things like log4j
> DataSources etc, perhaps Sun's implementation does also?
>
> -----Original Message-----
> From: Adrian Pitulac [mailto:adrian@idsys.ro]
> Sent: Tuesday, August 08, 2006 5:19 PM
> To: log4j-user@logging.apache.org
> Subject: Expert help needed for logging in a JavaEE application with
> Log4j...
>
> Hello,
>
> I'm new to Log4j and large scale enterprise applications and i need some
> clarifications on log4j.... i've read lots of docs and the forums around
> but have not found a full answer yet..
> I have a big application to build on JavaEE and we have preselected Sun
> Application Server 9 as a good solution for deployment. The application
> consists of lots of stateless, stateful and message driven beans.
> I want to use Log4j as the logging framework for this project. One of
> the features i want to use without any other discussions is the xml
> configuration for log4j. But due to the restrictions imposed by
> JavaEE/EJB specifications i cannot use any java.io class in my beans.
> So it remains as an good option to run a client on the server
> machine(the one which hosts the application server) which will pass as a
> stream the xml config. Here comes the tricky part. One of our
> requirement is that the javaEE application has to be fully clusterable.
>
> My questions are:
> 1. Is the streamable xml config a good way of configuring log4j in
> ejb's? what other solutions are there besides initializing log4j in a
> servlet?
> 2. Are the Logger static class instances from two session beans working
> on the same hierarchy? If not do we have to configure them separately?
> 3. How will an application server behave in a clustered environment? Are
> there any other tips we should know about?
>
> I'll be very happy if i'll receive some answers here.. So i want to
> thank in advance people who could help me.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
RE: Expert help needed for logging in a JavaEE application with Log4j...
Posted by "Harp, George" <GH...@GAINSystems.com>.
You may want to check the J2EE server you are examining.
I know JBoss has a separate directory to congigure things like log4j
DataSources etc, perhaps Sun's implementation does also?
-----Original Message-----
From: Adrian Pitulac [mailto:adrian@idsys.ro]
Sent: Tuesday, August 08, 2006 5:19 PM
To: log4j-user@logging.apache.org
Subject: Expert help needed for logging in a JavaEE application with
Log4j...
Hello,
I'm new to Log4j and large scale enterprise applications and i need some
clarifications on log4j.... i've read lots of docs and the forums around
but have not found a full answer yet..
I have a big application to build on JavaEE and we have preselected Sun
Application Server 9 as a good solution for deployment. The application
consists of lots of stateless, stateful and message driven beans.
I want to use Log4j as the logging framework for this project. One of
the features i want to use without any other discussions is the xml
configuration for log4j. But due to the restrictions imposed by
JavaEE/EJB specifications i cannot use any java.io class in my beans.
So it remains as an good option to run a client on the server
machine(the one which hosts the application server) which will pass as a
stream the xml config. Here comes the tricky part. One of our
requirement is that the javaEE application has to be fully clusterable.
My questions are:
1. Is the streamable xml config a good way of configuring log4j in
ejb's? what other solutions are there besides initializing log4j in a
servlet?
2. Are the Logger static class instances from two session beans working
on the same hierarchy? If not do we have to configure them separately?
3. How will an application server behave in a clustered environment? Are
there any other tips we should know about?
I'll be very happy if i'll receive some answers here.. So i want to
thank in advance people who could help me.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org