Search in sources :

Example 1 with ConfigurationException

use of org.apache.axis.ConfigurationException in project Lucee by lucee.

the class RPCServer method getEngine.

/**
 * get the engine for this Server from cache or context
 * @return
 * @throws AxisFault
 */
public AxisServer getEngine() throws AxisFault {
    if (axisServer == null) {
        synchronized (context) {
            Map environment = new HashMap();
            environment.put(AxisEngine.ENV_SERVLET_CONTEXT, context);
            axisServer = AxisServer.getServer(environment);
            axisServer.setName("LuceeServer");
        }
        // add Component Handler
        try {
            SimpleChain sc = (SimpleChain) axisServer.getGlobalRequest();
            sc.addHandler(new ComponentHandler());
        } catch (ConfigurationException e) {
            throw AxisFault.makeFault(e);
        }
        TypeMappingUtil.registerDefaults(axisServer.getTypeMappingRegistry());
    }
    return axisServer;
}
Also used : HashMap(java.util.HashMap) WeakHashMap(java.util.WeakHashMap) ConfigurationException(org.apache.axis.ConfigurationException) SimpleChain(org.apache.axis.SimpleChain) Map(java.util.Map) HashMap(java.util.HashMap) WeakHashMap(java.util.WeakHashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 WeakHashMap (java.util.WeakHashMap)1 ConfigurationException (org.apache.axis.ConfigurationException)1 SimpleChain (org.apache.axis.SimpleChain)1