The Java Service Manager is extremely flexible. It can be used to implement your own Java classes on the server or if you wish to use third party Java classes, you can create a Java service for these classes. By creating a service you receive all of the benefits of the Java Service Manager.
In order to create your own Java service, you must have a working knowledge of Java and you must learn the Java Service Manager interfaces. Refer to Create Your Own Services