Commons Daemon: Difference between revisions
Illik~enwiki (talk | contribs) No edit summary |
added Category:Apache Commons using HotCat |
||
(45 intermediate revisions by 31 users not shown) | |||
Line 1: | Line 1: | ||
{{more citations needed|date=June 2023}} |
|||
JSCV designates the Jakarta Tomcat 4.0 project´s Daemon component with the proposed package name org.apache.commons.daemon. For that, it is also called the '''commons daemon''', while Commons ist the Jakarta subproject which focuses on reusable Java components. |
|||
{{Infobox software |
|||
| name = Commons Daemon |
|||
| logo = |
|||
| screenshot = |
|||
| caption = |
|||
| developer = [[Apache Software Foundation]] |
|||
| latest release version = 1.3.4<ref>{{cite web | url=https://commons.apache.org/proper/commons-daemon/changes-report.html | title=Daemon – Apache Commons Daemon Release Notes }}</ref> |
|||
| latest release date = {{Start date and age|2023|05|10}} |
|||
| operating system = [[Cross-platform]] |
|||
| programming language = [[Java (programming language)|Java]], [[C (programming language)|C]] |
|||
| genre = [[Library (computing)|Library]] |
|||
| license = [[Apache License 2.0]] |
|||
| website = {{URL|http://commons.apache.org/daemon}} |
|||
}} |
|||
'''Commons Daemon''', formerly known as '''JSVC''', is a [[Java (Sun)|Java]] [[Library (computer science)|software library]] belonging to the [[Apache Software Foundation|Apache]] [[Apache Commons|Commons Project]]. |
|||
Daemon provides a portable means of starting and stopping a [[Java Virtual Machine]] (JVM) that is running server-side applications. Such applications often have additional requirements compared to client-side applications. For example, the servlet container [[Apache Tomcat|Tomcat 4]] would need to serialize sessions and shutdown web applications before the JVM process terminates. |
|||
In a nutshell, JSCV provides '''means of interacting with non-interactive Unix daemons''' (as far as Win32 services are concerned, ''procrun'' would be the adequate counterpart). It is made of 2 parts. One is written in C that makes the interface to the operating system, the other in Java, that provides the Daemon API. |
|||
Daemon comprises 2 parts: a native library written in [[C (programming language)|C]] that interfaces with the operating system, and the library that provides the Daemon API, written in Java. |
|||
For a wider understanding of when such a component is usefull, one has to grasp the distinction between server and client applications in terms of starting and stopping them. |
|||
⚫ | |||
Whilst Client Java platform applications are started through a single point of entry (the public static void main(String[]) method), those applications can afterwards be stopped interactively by the user. The quitting application then can terminate the JavaVM process by calling the ''System.exit(int)'' method. |
|||
{{Apache Software Foundation}} |
|||
For non-interactice applications (like server application) there is no portable way to notify the Virtual Machine of its imminent shutdown, which might be required in such cases as the server application 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. |
|||
== References == |
|||
This problem can be surpassed by using JSVC and through that "interface" initiating the startup or shutdown of daemons like for excample Tomcat. |
|||
{{reflist}} |
|||
[[Category:Java (programming language) libraries]] |
|||
⚫ | |||
[[Category:Apache Software Foundation|Commons Daemon]] |
|||
[[Category:Apache Commons|Daemon]] |
Latest revision as of 22:28, 18 July 2024
This article needs additional citations for verification. (June 2023) |
Developer(s) | Apache Software Foundation |
---|---|
Stable release | 1.3.4[1]
/ May 10, 2023 |
Repository | |
Written in | Java, C |
Operating system | Cross-platform |
Type | Library |
License | Apache License 2.0 |
Website | commons |
Commons Daemon, formerly known as JSVC, is a Java software library belonging to the Apache Commons Project.
Daemon provides a portable means of starting and stopping a Java Virtual Machine (JVM) that is running server-side applications. Such applications often have additional requirements compared to client-side applications. For example, the servlet container Tomcat 4 would need to serialize sessions and shutdown web applications before the JVM process terminates.
Daemon comprises 2 parts: a native library written in C that interfaces with the operating system, and the library that provides the Daemon API, written in Java.
There are two ways to use Commons Daemon: by implementing the daemon interface or by calling a class that provides the required methods for daemon. For example, Tomcat-4.1.x uses the daemon interface and Tomcat-5.0.x provides a class whose methods are called by JSVC directly.