-
daemons (5 messages)
- Posted by: Dieter Schulten
- Posted on: September 30 2006 05:52 EDT
i need to write a application which monitors directories. this application needs to look for files in a given directory and if the number of files reaches for example 100, than a email has to be send to a person. the application is like a "daemon" application. a web interface is mandatory to view the current state of the application. this is a simple application. BUT, what is the "standard" way to do it with "J2EE". i want to use servlets/jsp to create the web interface. but how can you implement a "daemon"?Threaded Messages (5)
- Re: daemons by Joao Cerdeira on September 30 2006 17:31 EDT
- re: daemons by Dieter Schulten on October 01 2006 05:12 EDT
- Re: re: daemons by Nicke G on October 01 2006 12:07 EDT
- J2EE - The Real Choice? by Dieter Schulten on October 02 2006 03:18 EDT
- Re: daemons by constantin mitocaru on October 02 2006 04:58 EDT
-
Re: daemons[ Go to top ]
- Posted by: Joao Cerdeira
- Posted on: September 30 2006 17:31 EDT
- in response to Dieter Schulten
Try using Quartz for deamon/job sheduling http://www.opensymphony.com/quartz/ i use it with so good result, i hope it would be usefull to you to :) -
re: daemons[ Go to top ]
- Posted by: Dieter Schulten
- Posted on: October 01 2006 05:12 EDT
- in response to Dieter Schulten
Thanx for the information. But scheduling is not the problem i have. I guess i could also use a timer bean. My problem is to write something like a daemon AND USE SERVLETS/JSP FOR THE GUI. Of course i can write a very little java program that fits the requirements and use quartz to do the scheduling. but if i do so, how can is use servlets/jsp to create a gui? i do NOT want to implement my own http listener. What is the "J2EE Way" to do what i want to do? -
Re: re: daemons[ Go to top ]
- Posted by: Nicke G
- Posted on: October 01 2006 12:07 EDT
- in response to Dieter Schulten
Take a look at Jetty, a very small servlet container that may be embedded in your small application. http://www.mortbay.org/ /Niklas -
J2EE - The Real Choice?[ Go to top ]
- Posted by: Dieter Schulten
- Posted on: October 02 2006 03:18 EDT
- in response to Dieter Schulten
Thanx again. But thats also not what i need. The more i get involved into the J2EE architecture and the J2EE features the more i realize that J2EE is not the best choice to implement a "HUGE", "VERY DISTRIBUTED", "MULTI APPLICATION BASED" enterprise solution. From all the answers i got to my post and all the things i read about J2EE i guess the final answer is: "J2EE HAS NO DAEMON SUPPORT". A lot of things are missing in J2EE, very much is unusable and to complicated. And then there is SUN, sleeping for the last five years and ignoring the J2EE community. Becaus a lot of things in J2EE are just "BAD" peoble begin to create their own "Specifications". So there was a SPRING Framework born, hibernate came up, and and and and and so on. If anybody from the company SUN is reading this, please wake up! -
Re: daemons[ Go to top ]
- Posted by: constantin mitocaru
- Posted on: October 02 2006 04:58 EDT
- in response to Dieter Schulten
I would create the daemon queriable/controlable through RMI (one of the remote methods would be public String getStatus()). Then I would install your java daemon as an NT service (using JavaService.exe). From your servlet you can query/controll your daemon using the RMI remote interface. If you don't want to use RMI+Services I would create your daemon as a Thread in the Web Server's Application context (created when the application initializes > create your own ServletContextListener). Your servlet gets the instance of your daemon from the servlet context and uses it to query it's status.i need to write a application which monitors directories. this application needs to look for files in a given directory and if the number of files reaches for example 100, than a email has to be send to a person. the application is like a "daemon" application. a web interface is mandatory to view the current state of the application.
this is a simple application. BUT, what is the "standard" way to do it with "J2EE". i want to use servlets/jsp to create the web interface.
but how can you implement a "daemon"?