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

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


    @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 {
                integrationContext.restoreConnectorContext(connectorContext, baseRequest, newContext);
View Full Code Here


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

        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);
View Full Code Here

    }

    public void before(Object[] context, ServletRequest httpRequest, ServletResponse httpResponse, int dispatch) {
        try {
            SharedConnectorInstanceContext newConnectorInstanceContext = new SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources, false);
            ConnectorInstanceContext oldContext = trackedConnectionAssociator.enter(newConnectorInstanceContext);
            if (oldContext != null) {
                newConnectorInstanceContext.share(oldContext);
            }
            context[oldIndex] = oldContext;
            context[newIndex] = newConnectorInstanceContext;
View Full Code Here

    public void after(Object[] context, ServletRequest httpRequest, ServletResponse httpResponse, int dispatch) {
        if (next != null) {
            next.after(context, httpRequest, httpResponse, dispatch);
        }
        try {
            ConnectorInstanceContext oldConnectorInstanceContext = (ConnectorInstanceContext) context[oldIndex];
            SharedConnectorInstanceContext newConnectorInstanceContext = (SharedConnectorInstanceContext) context[newIndex];
            if (oldConnectorInstanceContext != null) {
                newConnectorInstanceContext.hide();
            }
            trackedConnectionAssociator.exit(oldConnectorInstanceContext);
View Full Code Here

        // Demarcate component boundaries for connection tracking if we have a tracker
        TrackedConnectionAssociator trackedConnectionAssociator = ejbDeployment.getTrackedConnectionAssociator();
        if (trackedConnectionAssociator != null) {
            // create the connector context... this only works with a TrackedConnectionAssociator using lazy association
            ConnectorInstanceContext connectorContext = new ConnectorInstanceContextImpl(ejbDeployment.getUnshareableResources(),
                    ejbDeployment.getApplicationManagedSecurityResources());

            // Set connector context
            try {
                geronimoCallContext.oldConnectorContext = trackedConnectionAssociator.enter(connectorContext);
View Full Code Here

    @Override
    protected 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);
        WebBeansContext oldOwbContext = integrationContext.contextEntered();
        try {
            setRestrictListeners(false);
            try {
                Assembler assembler = new Assembler();
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 {
                integrationContext.restoreConnectorContext(connectorContext, null, newContext);
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);
        WebBeansContext owbContext = integrationContext.contextEntered();
        String oldApplicationIdentity = WebApplicationIdentity.getIdentity();
        WebApplicationIdentity.setIdentity(integrationContext.getWebApplicationIdentity());
        try {
            try {
View Full Code Here

    }

    public void before(BeforeAfterContext beforeAfterContext, ServletRequest httpRequest, ServletResponse httpResponse, int dispatch) {
        try {
            SharedConnectorInstanceContext newConnectorInstanceContext = new SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources, false);
            ConnectorInstanceContext oldContext = trackedConnectionAssociator.enter(newConnectorInstanceContext);
            if (oldContext != null) {
                newConnectorInstanceContext.share(oldContext);
            }
            beforeAfterContext.contexts[oldIndex] = oldContext;
            beforeAfterContext.clearRequiredFlags[oldIndex] = true;
View Full Code Here

TOP

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

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.