<s>
Commons	B-Language
Daemon	I-Language
,	O
formerly	O
known	O
as	O
JSVC	B-Language
,	O
is	O
a	O
Java	B-Device
software	B-Library
library	I-Library
belonging	O
to	O
the	O
Apache	B-Language
Commons	I-Language
Project	O
.	O
</s>
<s>
Daemon	O
provides	O
a	O
portable	O
means	O
of	O
starting	O
and	O
stopping	O
a	O
Java	B-Language
Virtual	I-Language
Machine	I-Language
(	O
JVM	B-Language
)	O
that	O
is	O
running	O
server-side	O
applications	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
servlet	O
container	O
Tomcat	B-Language
4	I-Language
would	O
need	O
to	O
serialize	O
sessions	O
and	O
shutdown	O
web	O
applications	O
before	O
the	O
JVM	B-Language
process	O
terminates	O
.	O
</s>
<s>
Daemon	O
comprises	O
2	O
parts	O
:	O
a	O
native	B-Library
library	I-Library
written	O
in	O
C	B-Language
that	O
interfaces	O
with	O
the	O
operating	O
system	O
,	O
and	O
the	O
library	B-Library
that	O
provides	O
the	O
Daemon	O
API	O
,	O
written	O
in	O
Java	B-Device
.	O
</s>
<s>
There	O
are	O
two	O
ways	O
to	O
use	O
Commons	B-Language
Daemon	I-Language
:	O
by	O
implementing	O
the	O
daemon	O
interface	O
or	O
by	O
calling	O
a	O
class	O
that	O
provides	O
the	O
required	O
methods	O
for	O
daemon	O
.	O
</s>
<s>
For	O
example	O
,	O
Tomcat-4.1.x	O
uses	O
the	O
daemon	O
interface	O
and	O
Tomcat-5.0.x	O
provides	O
a	O
class	O
whose	O
methods	O
are	O
called	O
by	O
JSVC	B-Language
directly	O
.	O
</s>
