⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 processconfimpl.java

📁 bpel执行引擎用来执行bpel业务流程
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        return _state;    }    void setState(ProcessState state) {        _state = state;    }    public List<String> getMexInterceptors(QName processId) {        return Collections.unmodifiableList(_mexi);    }    public Definition getDefinitionForService(QName serviceName) {        return _du.getDefinitionForService(serviceName);    }    public Definition getDefinitionForPortType(QName portTypeName) {        return _du.getDefinitionForPortType(portTypeName);    }    public Map<String, Endpoint> getInvokeEndpoints() {        return Collections.unmodifiableMap(_partnerRoleInitialValues);    }    public Map<String, Endpoint> getProvideEndpoints() {        return Collections.unmodifiableMap(_myRoleEndpoints);    }    private void handleEndpoints() {        // for (TProvide provide : _pinfo.getProvideList()) {        // OPartnerLink pLink = _oprocess.getPartnerLink(provide.getPartnerLink());        // if (pLink == null) {        // String msg = __msgs.msgDDPartnerLinkNotFound(provide.getPartnerLink());        // __log.error(msg);        // throw new BpelEngineException(msg);        // }        // if (!pLink.hasMyRole()) {        // String msg = __msgs.msgDDMyRoleNotFound(provide.getPartnerLink());        // __log.error(msg);        // throw new BpelEngineException(msg);        // }        // }        // for (TInvoke invoke : _pinfo.getInvokeList()) {        // OPartnerLink pLink = _oprocess.getPartnerLink(invoke.getPartnerLink());        // if (pLink == null) {        // String msg = __msgs.msgDDPartnerLinkNotFound(invoke.getPartnerLink());        // __log.error(msg);        // throw new BpelEngineException(msg);        // }        // if (!pLink.hasPartnerRole()) {        // String msg = __msgs.msgDDPartnerRoleNotFound(invoke.getPartnerLink());        // __log.error(msg);        // throw new BpelEngineException(msg);        // }        // TODO Handle non initialize partner roles that just provide a binding        // if (!pLink.initializePartnerRole && _oprocess.version.equals(Namespaces.WS_BPEL_20_NS)) {        // String msg = ProcessDDInitializer.__msgs.msgDDNoInitiliazePartnerRole(invoke.getPartnerLink());        // ProcessDDInitializer.__log.error(msg);        // throw new BpelEngineException(msg);        // }        // }    }    DeploymentUnitDir getDeploymentUnit() {        return _du;    }    public boolean isTransient() {        return _inMemory;    }    public void setTransient(boolean t) {        _pinfo.setInMemory(t);        _inMemory = t;    }    public boolean isEventEnabled(List<String> scopeNames, BpelEvent.TYPE type) {        if (scopeNames != null) {            for (String scopeName : scopeNames) {                Set<BpelEvent.TYPE> evtSet = _events.get(scopeName);                if (evtSet != null) {                    if (evtSet.contains(type)) return true;                }            }        }        Set<BpelEvent.TYPE> evtSet = _events.get(null);        if (evtSet != null) {            // Default filtering at the process level for some event types            if (evtSet.contains(type)) return true;        }        return false;    }    private void initEventList() {        TProcessEvents processEvents = _pinfo.getProcessEvents();        // No filtering, using defaults        if (processEvents == null) {            HashSet<BpelEvent.TYPE> all = new HashSet<BpelEvent.TYPE>();            for (BpelEvent.TYPE t : BpelEvent.TYPE.values()) {                if (!t.equals(BpelEvent.TYPE.scopeHandling)) all.add(t);            }            _events.put(null, all);            return;        }        // Adding all events        if (processEvents.getGenerate() != null && processEvents.getGenerate().equals(TProcessEvents.Generate.ALL)) {            HashSet<BpelEvent.TYPE> all = new HashSet<BpelEvent.TYPE>();            for (BpelEvent.TYPE t : BpelEvent.TYPE.values())                all.add(t);            _events.put(null, all);            return;        }        // Events filtered at the process level        if (processEvents.getEnableEventList() != null) {            List<String> enabled = processEvents.getEnableEventList();            HashSet<BpelEvent.TYPE> evtSet = new HashSet<BpelEvent.TYPE>();            for (String enEvt : enabled) {                evtSet.add(BpelEvent.TYPE.valueOf(enEvt));            }            _events.put(null, evtSet);        }        // Events filtered at the scope level        if (processEvents.getScopeEventsList() != null) {            for (TScopeEvents tScopeEvents : processEvents.getScopeEventsList()) {                HashSet<BpelEvent.TYPE> evtSet = new HashSet<BpelEvent.TYPE>();                for (String enEvt : tScopeEvents.getEnableEventList()) {                    evtSet.add(BpelEvent.TYPE.valueOf(enEvt));                }                _events.put(tScopeEvents.getName(), evtSet);            }        }    }    private String getRelativePath(File base, File path) throws IOException {        String basePath = base.getCanonicalPath();        String cbpPath = path.getCanonicalPath();        if (!cbpPath.startsWith(basePath))            throw new IOException("Invalid relative path: base=" + base + " path=" + path);        String relative = cbpPath.substring(basePath.length());        if (relative.startsWith(File.separator)) relative = relative.substring(1);        return relative;    }    public List<Element> getExtensionElement(QName qname) {        try {            return DOMUtils.findChildrenByName(DOMUtils.stringToDOM(_pinfo.toString()), qname);        } catch (Exception e) {            return Collections.emptyList();        }    }    public Map<String, String> getEndpointProperties(EndpointReference epr) {        final Map map = eprContext.getConfigLookup(epr);        final QName service = (QName) map.get("service");        final String port = (String) map.get("port");        // update properties if necessary        // do it manually to save resources (instead of using a thread)        ilWatchDog.check();        if (ilProperties == null) {            return Collections.EMPTY_MAP;        } else {            // take a lock so we can have a consistent snapshot of the properties            ilPropertiesLock.readLock().lock();            try {                return ilProperties.getProperties(service, port);            } finally {                ilPropertiesLock.readLock().unlock();            }        }    }    /**     * Manage the reloading of the propery file every {@link org.apache.ode.utils.fs.FileWatchDog#DEFAULT_DELAY}.     * The check is done manually, meaning that {@link #check()} must be invoked each time _ilProperties is accessed.     */    private class ILWatchDog extends FileWatchDog {        public ILWatchDog() {            super(_du.getEPRConfigFile());        }        protected void init() {            ilPropertiesLock.writeLock().lock();            try {                if (ilProperties == null) {                    try {                        ilProperties = new HierarchicalProperties(super.file);                    } catch (IOException e) {                        throw new ContextException("Integration-Layer Properties cannot be loaded!", e);                    }                } else {                    ilProperties.clear();                }            } finally {                ilPropertiesLock.writeLock().unlock();            }        }        protected boolean isInitialized() {            return ilProperties != null;        }        protected void doOnUpdate() {            ilPropertiesLock.writeLock().lock();            try {                init();                try {                    ilProperties.loadFile();                } catch (IOException e) {                    throw new ContextException("Integration-Layer Properties cannot be loaded!", e);                }            } finally {                ilPropertiesLock.writeLock().unlock();            }        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -