Quick Start

Creating New Services

JMCE was designed to make creating new services very easily. The JMCE design DOES NOT require you to implement any interfaces or extend any classes from JMCE. To create a new service you need to do three things:

  1. Create a JAR file containing a *.class file that has a main(String [] args) method. For example, JAR up this:
    package a.b.c;
    public class HelloWorld
    {
        public static final void main(String [] args) {
            while (true) {
                System.out.println("Hello World");
                Thread.sleep(1000 * 10); //10 seconds
            }
        }
    }
    
  2. Create the jmce.xml file. For the above example, it would look like this:
    <jmce><main-class>a.b.c.HelloWorld</main-class></jmce>
  3. Drop everything into ${JMCE_HOME}/deploy
    /ferris-jmce-0.0.1
        /deploy
            /MyHelloWorldService
            	jmce.xml
            	/lib
            		helloworld.jar        					
    				

If you follow the 3 steps above then run the JMCE server, you will be able to tail the ${JMCE_HOME}/logs/server-log4j.log and see the output from HelloWorld

If you want your application to log to its own log file in ${JMCE_HOME}/logs/, use Log4j and follow the instructions on the logging page.