Skip to main content

Home/ Java Development/ Group items tagged daemon

Rss Feed Group items tagged

Hendy Irawan

Apache Commons Daemon : Java based daemons or services - 0 views

  •  
    "Since 1994, the Java programming language evolved and became a valid tool to develop reliable and performant server applications as opposed to just applets and client applications. The major disadvantage of the Java platform is that still today the only portable way to start a Java application relies on a single point of entry: the public static void main(String[]) method. Having a single-point of entry is a valid solution for client applications, where interactively a user can command to the application to quit (which can terminate the Virtual Machine process at calling the System.exit(int) method), but in those cases where the application is not interactive (server applications) there is currently no portable way to notify the Virtual Machine of its imminent shutdown. A server application written in Java might have to perform several tasks before being able to shutdown the Virtual Machine process. For example in the case of a Servlet container, before the VM process is shut down, sessions might need to be serialized to disk, and web applications need to be destroyed. One common solution to this problem is to create (for example) a ServerSocket and wait for a particular message to be issued. When the message is received, all operations required to shut down the server applications are performed and at the end the System.exit method is called to terminate the Virtual Machine process. This method however, has several disadvantages and risks: In case of a system-wide shutdown, the Virtual Machine process may be shut down directly by the operating system without notifying the running server application. If an attacker finds out the shutdown message to send to the server and discovers a way to send this message, he can easily interrupt the server's operation, bypassing all the security restrictions implemented in the operating system. Most multi-user operating systems already have a way in which server applications are started and stopped. Under Unix based
anonymous

IntroductionYet Another Java Service Wrapper - 0 views

  •  
    A Java centric implementation of the java service wrapper by Tanuki Software (JSW). Wrap a Java application as as Windows service or UNIX daemon.
1 - 2 of 2
Showing 20 items per page