Package org.apache.ode.bpel.iapi

Examples of org.apache.ode.bpel.iapi.BpelEngineException


                }
            });
        } catch (Exception ex) {
            String errmsg = "DbError";
            __log.error(errmsg, ex);
            throw new BpelEngineException(errmsg, ex);
        }
    }
View Full Code Here


        try {
            // Obtain the list of processes that this service is potentially targeted at
            final List<ODEProcess> targets = route(targetService, null);

            if (targets == null || targets.size() == 0)
                throw new BpelEngineException("NoSuchService: " + targetService);
           
            if (targets.size() == 1) {
                // If the number of targets is one, create and return a simple MEX
                ODEProcess target = targets.get(0);
                return createNewMyRoleMex(target, istyle, targetService, operation, clientKey);
View Full Code Here

            return new BrokeredTransactedMyRoleMessageExchangeImpl(target, meps, mexId, template);
        case UNRELIABLE:
            return new BrokeredUnreliableMyRoleMessageExchangeImpl(target, meps, mexId, template);
        case P2P:
        default:
            throw new BpelEngineException("Unsupported Invocation Style: " + istyle);
        }
    }
View Full Code Here

                    if (process == null) {
                        String errmsg = __msgs.msgProcessNotActive(pdao.getProcessId());
                        __log.error(errmsg);
                        // TODO: Perhaps we should define a checked exception for this
                        // condition.
                        throw new BpelEngineException(errmsg);
                    }

                    InvocationStyle istyle = mexdao.getInvocationStyle();
                    if (istyle == InvocationStyle.RELIABLE || istyle == InvocationStyle.TRANSACTED)
                        assertTransaction();

                    switch (mexdao.getDirection()) {
                    case MessageExchangeDAO.DIR_BPEL_INVOKES_PARTNERROLE:
                        return process.createPartnerRoleMex(mexdao);
                    case MessageExchangeDAO.DIR_PARTNER_INVOKES_MYROLE:
                        return process.lookupMyRoleMex(mexdao);
                    default:
                        String errmsg = "BpelEngineImpl: internal error, invalid MexDAO direction: " + mexId;
                        __log.fatal(errmsg);
                        throw new BpelEngineException(errmsg);
                    }
                }
            };

            try {
                if (inmemdao != null || _contexts.isTransacted())
                    return loadMex.call();
                else
                    return enqueueTransaction(loadMex).get();
            } catch (ContextException e) {
                throw new BpelEngineException(e);
            } catch (Exception e) {
                throw new BpelEngineException(e);
            }

        } finally {
            _mngmtLock.readLock().unlock();
        }
View Full Code Here

        _mngmtLock.readLock().lock();
        try {
            List<ODEProcess> processes = route(serviceId, null);
            if (processes == null || processes.size() == 0)
                throw new BpelEngineException("No such service: " + serviceId);

            // Compute the intersection of the styles of all providing processes
            Set<InvocationStyle> istyles = new HashSet<InvocationStyle>();
            for (ODEProcess process : processes) {
                Set<InvocationStyle> pistyles = process.getSupportedInvocationStyle(serviceId);
View Full Code Here

    }

   
    protected void assertTransaction() {
        if (!_contexts.isTransacted())
            throw new BpelEngineException("Operation must be performed in a transaction!");
    }
View Full Code Here

            throw new BpelEngineException("Operation must be performed in a transaction!");
    }

    protected void assertNoTransaction() {
        if (_contexts.isTransacted())
            throw new BpelEngineException("Operation must be performed outside of a transaction!");
    }
View Full Code Here

    protected void checkReplyContextOk() {
        super.checkReplyContextOk();

        // Prevent user from attempting the replyXXXX calls while a transaction is active.
        if (_contexts.isTransacted())
            throw new BpelEngineException("Cannot reply to UNRELIABLE style invocation from a transactional context!");

    }
View Full Code Here

    public boolean isTransacted() {
        try {
            return txManager.getStatus() == Status.STATUS_ACTIVE;
        } catch (SystemException e) {
            throw new BpelEngineException(e);
        }
    }
View Full Code Here

                    return null;
                }

            });
        } catch (Exception e) {
            throw new BpelEngineException(e);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.iapi.BpelEngineException

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.