Package org.apache.geronimo.connector.outbound.connectiontracking

Examples of org.apache.geronimo.connector.outbound.connectiontracking.SharedConnectorInstanceContext


    }

    public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException {
        try {
            if (dispatch == Handler.REQUEST) {
                ConnectorInstanceContext oldContext = trackedConnectionAssociator.enter(new SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources, false));

                try {
                    next.handle(target, request, response, dispatch);
                } finally {
                    trackedConnectionAssociator.exit(oldContext);
                }
            } else {
                SharedConnectorInstanceContext context = new SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources, true);
                SharedConnectorInstanceContext oldContext = (SharedConnectorInstanceContext) trackedConnectionAssociator.enter(context);
                context.share(oldContext);
                try {
                    next.handle(target, request, response, dispatch);
                } finally {
                    context.hide();
View Full Code Here


    @Override
    public void doStart() throws Exception {
        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 {
View Full Code Here

    @Override
    public void doStop() throws Exception {
        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 {
View Full Code Here

            }
        }
       
        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 {
View Full Code Here

    @Override
    protected void doStop() throws Exception {
        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 {
View Full Code Here

    @Override
    public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        javax.naming.Context context = integrationContext.setContext();
        boolean txActive = integrationContext.isTxActive();
        SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(baseRequest);
        ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(baseRequest, newContext);
        try {
            try {
                super.doScope(target, baseRequest, request, response);
            } finally {
View Full Code Here

    public UserTransaction getUserTransaction() {
        return userTransaction;
    }
   
    public SharedConnectorInstanceContext newConnectorInstanceContext(Request baseRequest) {
        return new SharedConnectorInstanceContext(getUnshareableResources(),
                getApplicationManagedSecurityResources(),
                !isDispatch(baseRequest));
    }
View Full Code Here

        return DispatcherType.REQUEST.equals(baseRequest.getDispatcherType());
    }

    public ConnectorInstanceContext setConnectorInstance(Request baseRequest, SharedConnectorInstanceContext newContext) throws ServletException {
        try {
            SharedConnectorInstanceContext oldContext = (SharedConnectorInstanceContext) getTrackedConnectionAssociator().enter(newContext);
            if (oldContext != null && !isDispatch(baseRequest)) {
                newContext.share(oldContext);
            }
            return oldContext;
        } catch (ResourceException e) {
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.setFilter((Filter)newInstance());
                    super.doStart();
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 {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.connector.outbound.connectiontracking.SharedConnectorInstanceContext

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.