Package org.apache.geronimo.jetty8.handler

Examples of org.apache.geronimo.jetty8.handler.IntegrationContext


            }
        }

        @Override
        public void doStart() throws Exception {
            IntegrationContext integrationContext = servletRegistration.getIntegrationContext();
            javax.naming.Context context = integrationContext.setContext();
            boolean txActive = integrationContext.isTxActive();
            SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
            ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
            try {
                try {
                    super.setFilter((Filter)newInstance());
                    super.doStart();
                } finally {
                    integrationContext.restoreConnectorContext(connectorContext, null, newContext);
                }
            } finally {
                integrationContext.restoreContext(context);
                integrationContext.completeTx(txActive, null);
            }
        }
View Full Code Here


            }
        }

        @Override
        public void doStop() throws Exception {
            IntegrationContext integrationContext = servletRegistration.getIntegrationContext();
            javax.naming.Context context = integrationContext.setContext();
            boolean txActive = integrationContext.isTxActive();
            SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
            ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
            try {
                try {
                    super.doStop();
                } finally {
                    integrationContext.restoreConnectorContext(connectorContext, null, newContext);
                }
            } finally {
                integrationContext.restoreContext(context);
                integrationContext.completeTx(txActive, null);
            }
        }
View Full Code Here

        ServletHandler servletHandler = new ServletHandler();

        //wrap the web app context with the jndi handler
        GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
        this.componentContext = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, userTransaction, kernel, classLoader);
        integrationContext = new IntegrationContext(this.componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction);
        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader);
        webAppContext.setContextPath(contextPath);
        //See Jetty-386.  Setting this to true can expose secured content.
        webAppContext.setCompactPath(compactPath);
View Full Code Here

            }
        }

        @Override
        public void doStart() throws Exception {
            IntegrationContext integrationContext = servletRegistration.getIntegrationContext();
            javax.naming.Context context = integrationContext.setContext();
            boolean txActive = integrationContext.isTxActive();
            SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
            ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
            try {
                try {
                    super.doStart();
                } finally {
                    integrationContext.restoreConnectorContext(connectorContext, null, newContext);
                }
            } finally {
                integrationContext.restoreContext(context);
                integrationContext.completeTx(txActive, null);
            }
        }
View Full Code Here

            }
        }

        @Override
        public void doStop() throws Exception {
            IntegrationContext integrationContext = servletRegistration.getIntegrationContext();
            javax.naming.Context context = integrationContext.setContext();
            boolean txActive = integrationContext.isTxActive();
            SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
            ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
            try {
                try {
                    super.doStop();
                } finally {
                    integrationContext.restoreConnectorContext(connectorContext, null, newContext);
                }
            } finally {
                integrationContext.restoreContext(context);
                integrationContext.completeTx(txActive, null);
            }
        }
View Full Code Here

        ServletHandler servletHandler = new ServletHandler();

        //wrap the web app context with the jndi handler
        GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
        this.componentContext = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, userTransaction, kernel, classLoader);
        integrationContext = new IntegrationContext(this.componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction);
        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader);
        webAppContext.setContextPath(contextPath);
        //See Jetty-386.  Setting this to true can expose secured content.
        webAppContext.setCompactPath(compactPath);
View Full Code Here

    }

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);

        HttpURLConnection connection = (HttpURLConnection) new URL(hostURL + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

        }
    }
    public void test2WebServiceHandlers() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);

        String contextPath2 = "/bar/webservice.ws";
        MockWebServiceContainer webServiceInvoker2 = new MockWebServiceContainer();
        container.addWebService(contextPath2, null, webServiceInvoker2, null, null, null, null, null, cl);

        HttpURLConnection connection = (HttpURLConnection) new URL(hostURL + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

    }

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);

        HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:5678" + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

        }
    }
    public void test2WebServiceHandlers() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);

        String contextPath2 = "/bar/webservice.ws";
        MockWebServiceContainer webServiceInvoker2 = new MockWebServiceContainer();
        container.addWebService(contextPath2, null, webServiceInvoker2, null, null, null, null, null, cl);

        HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:5678" + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jetty8.handler.IntegrationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.