} catch (Exception e) {
}
}
public static void main(final String[] args) throws Exception {
Server server = new Server(7070);
org.mortbay.jetty.servlet.Context root =
new org.mortbay.jetty.servlet.Context(server, "/next-app", org.mortbay.jetty.servlet.Context.SESSIONS);
root.getSessionHandler().getSessionManager().setMaxInactiveInterval(5000);
Map<String, String> param = new HashMap<String, String>();
param.put("contextConfigLocation", "classpath:context.xml");
root.setInitParams(param);
root.addEventListener(new RequestContextListener());
root.addEventListener(new ContextLoaderListener());
root.addServlet(org.apache.cxf.transport.servlet.CXFServlet.class, "/services/*");
server.start();
SpringJAXRSServerFactoryBean factoryBean = new JAXRSServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean();
factoryBean.setAddress("/rest");
factoryBean.setServiceBeanObjects(new CommandExecutor());
List<Object> arrayList = new ArrayList<Object>();