Package org.apache.ode.jacob.vpu

Examples of org.apache.ode.jacob.vpu.ExecutionQueueImpl


        for (File soupState : soupsDir.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return name.startsWith("soup");
            }
        })) {
            ExecutionQueueImpl soup = new ExecutionQueueImpl(CoreBpelTest.class.getClassLoader());

            soup.read(new FileInputStream(soupState));
            JacobVPU vpu = new JacobVPU(soup);
            CoreBpelTest instance = new CoreBpelTest();
            vpu.registerExtension(OdeRTInstanceContext.class, instance);

            instance._completedOk = false;
View Full Code Here


        _iid = dao.getInstanceId();
        _instantiatingMessageExchange = instantiatingMessageExchange;
        _vpu = new JacobVPU();
        _vpu.registerExtension(BpelRuntimeContext.class, this);

        _soup = new ExecutionQueueImpl(null);
        _soup.setReplacementMap(_bpelProcess.getReplacementMap(dao.getProcess().getProcessId()));
        _outstandingRequests = null;
        _imaManager = new IMAManager2();
        _vpu.setContext(_soup);
View Full Code Here

                try {
                    if (instance.getExecutionState() == null) {
                        //Completed instance
                        __log.debug("Skipped");
                    } else {
                        ExecutionQueueImpl soup = new ExecutionQueueImpl(this.getClass().getClassLoader());
                        soup.setReplacementMap(process.getReplacementMap(processDao.getProcessId()));
                        soup.read(new ByteArrayInputStream(instance.getExecutionState()));
                        Object data = soup.getGlobalData();
                        if (data instanceof OutstandingRequestManager) {
                            OutstandingRequestManager orm = (OutstandingRequestManager) data;

                            IMAManager imaManager = new IMAManager();
                            imaManager.migrateRids(orm.getRids());
                            soup.setGlobalData(imaManager);

                            ByteArrayOutputStream bos = new ByteArrayOutputStream();
                            soup.write(bos);
                            instance.setExecutionState(bos.toByteArray());
                            __log.debug("Migrated outstanding requests for instance " + instance.getInstanceId());
                        }
                    }
                } catch (Exception e) {
View Full Code Here

                try {
                    if (instance.getExecutionState() == null) {
                        //Completed instance
                        __log.debug("Skipped");
                    } else {
                        ExecutionQueueImpl soup = new ExecutionQueueImpl(this.getClass().getClassLoader());
                        soup.setReplacementMap(process.getReplacementMap(processDao.getProcessId()));
                        soup.read(new ByteArrayInputStream(instance.getExecutionState()));
                        Object data = soup.getGlobalData();
                        if (data instanceof IMAManager) {
                            IMAManager imaOld = (IMAManager) data;

                            soup.setGlobalData(imaOld.toIMAManager2());

                            ByteArrayOutputStream bos = new ByteArrayOutputStream();
                            soup.write(bos);
                            instance.setExecutionState(bos.toByteArray());
                            __log.debug("Migrated outstanding requests for instance " + instance.getInstanceId());
                        }
                    }
                } catch (Exception e) {
View Full Code Here

    protected void setUp() throws Exception {
        _completedOk = false;
        _terminate = false;
        _fault = null;
        _soup = new ExecutionQueueImpl(CoreBpelTest.class.getClassLoader());
        _vpu = new JacobVPU();
        _vpu.setContext(_soup);
        _vpu.registerExtension(BpelRuntimeContext.class, this);
        _pid = new Long(19355);
    }
View Full Code Here

        _iid = dao.getInstanceId();
        _instantiatingMessageExchange = instantiatingMessageExchange;
        _vpu = new JacobVPU();
        _vpu.registerExtension(BpelRuntimeContext.class, this);

        _soup = new ExecutionQueueImpl(null);
        _soup.setReplacementMap(_bpelProcess.getReplacementMap(dao.getProcess().getProcessId()));
        _outstandingRequests = new OutstandingRequestManager();
        _vpu.setContext(_soup);

        if (bpelProcess.isInMemory()) {
View Full Code Here

        _iid = dao.getInstanceId();
        _instantiatingMessageExchange = instantiatingMessageExchange;
        _vpu = new JacobVPU();
        _vpu.registerExtension(BpelRuntimeContext.class, this);

        _soup = new ExecutionQueueImpl(null);
        _soup.setReplacementMap(_bpelProcess.getReplacementMap(dao.getProcess().getProcessId()));
        _outstandingRequests = null;
        _imaManager = new IMAManager();
        _vpu.setContext(_soup);
View Full Code Here

    protected void setUp() throws Exception {
        _completedOk = false;
        _terminate = false;
        _fault = null;
        _soup = new ExecutionQueueImpl(CoreBpelTest.class.getClassLoader());
        _vpu = new JacobVPU(_soup);
        _vpu.registerExtension(BpelRuntimeContext.class, this);
        _pid = new Long(19355);
    }
View Full Code Here

        return true;
    }

    private boolean updateV1Key(ProcessInstanceDAO instance, OProcess oproc) {
        ExecutionQueueImpl soup;
        try {
            soup = readOldState(instance, oproc, getClass().getClassLoader(), true);
            if (soup == null) return false;
        } catch (Exception e) {
            __log.debug("  failed to read a v1 state for instance " + instance.getInstanceId());
            ExecutionQueueImpl._classDescriptors.clear();
            return false;
        }
        try {
            OutstandingRequestManager orm = (OutstandingRequestManager) soup.getGlobalData();
            for (OutstandingRequestManager.Entry entry : orm._byChannel.values()) {
                Selector[] newSelectors = new Selector[entry.selectors.length];
                int index = 0;
                for (Object selector : entry.selectors) {
                    OldSelector sel = (OldSelector)selector;
View Full Code Here

        }
        return true;
    }

    private boolean updateV2Key(ProcessInstanceDAO instance, OProcess oproc) {
        ExecutionQueueImpl soup;
        try {
            soup = readOldState(instance, oproc, getClass().getClassLoader(), false);
            if (soup == null) return false;
        } catch (Exception e) {
            __log.debug("  failed to read a v2 state for instance " + instance.getInstanceId());
            ExecutionQueueImpl._classDescriptors.clear();
            return false;
        }
        OutstandingRequestManager orm = (OutstandingRequestManager) soup.getGlobalData();
        for (OutstandingRequestManager.Entry entry : orm._byChannel.values()) {
            Selector[] newSelectors = new Selector[entry.selectors.length];
            int index = 0;
            for (Object selector : entry.selectors) {
                OldSelector sel = (OldSelector)selector;
View Full Code Here

TOP

Related Classes of org.apache.ode.jacob.vpu.ExecutionQueueImpl

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.