/**
 */
package org.example.activemq.orbweaver.cc;

import javax.ws.rs.ext.RuntimeDelegate;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;


/**
 * JAX-RS ControlCenter root resource
 */
public class ControlCenterServer {
    private static Server server;

    protected ControlCenterServer() throws Exception {
        ControlCenterApp application = new ControlCenterApp();
        RuntimeDelegate delegate = RuntimeDelegate.getInstance();

        JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
        bean.setAddress("http://localhost:9000/services" + bean.getAddress());
        server = bean.create();
        server.start();
    }

    public static void main(String args[]) throws Exception {
        new ControlCenterServer();
        System.out.println("Server ready...");

        Thread.sleep(125 * 60 * 1000);
        System.out.println("Server exiting");
        server.stop();
        server.destroy();
        System.exit(0);
    }
}

@@ -45,16 +45,65 @@
 er.cc;%0A%0A
+import java.util.HashMap;%0Aimport java.util.Map;%0A%0A
 import j
@@ -525,24 +525,201 @@
 nstance();%0A%0A
+        Map%3CObject, Object%3E mappings = new HashMap%3CObject, Object%3E();%0A        mappings.put(%22json%22, %22application/json%22);%0A        mappings.put(%22xml%22, %22application/xml%22);%0A        %0A
         JAXR
@@ -891,16 +891,61 @@
 ess());%0A
+        bean.setExtensionMappings(mappings);%0A
         

Add extension mappings to server.