Search in sources :

Example 1 with ListingAgent

use of org.apache.axis2.transport.http.ListingAgent in project wso2-synapse by wso2.

the class SynapseAxisServlet method init.

/**
 * Overrides init method so that avoid  starting listeners again
 *
 * @param config the servlet configuration on which synapse initializes.
 * @throws ServletException
 */
public void init(ServletConfig config) throws ServletException {
    ServletContext servletContext = config.getServletContext();
    ServerManager serverManager = (ServerManager) config.getServletContext().getAttribute(SynapseStartUpServlet.SYNAPSE_SERVER_MANAGER);
    if (serverManager != null) {
        this.configContext = (ConfigurationContext) serverManager.getServerContextInformation().getServerContext();
        this.axisConfiguration = this.configContext.getAxisConfiguration();
        servletContext.setAttribute(this.getClass().getName(), this);
        this.servletConfig = config;
        agent = new ListingAgent(configContext);
        initParams();
    }
}
Also used : ServerManager(org.apache.synapse.ServerManager) ServletContext(javax.servlet.ServletContext) ListingAgent(org.apache.axis2.transport.http.ListingAgent)

Aggregations

ServletContext (javax.servlet.ServletContext)1 ListingAgent (org.apache.axis2.transport.http.ListingAgent)1 ServerManager (org.apache.synapse.ServerManager)1