Package org.apache.openejb.core.transaction

Examples of org.apache.openejb.core.transaction.TransactionPolicy.commit()


                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(orginalOperation);
                callContext.setCurrentAllowedStates(originalAllowedStates);
                txPolicy.commit();
            }

        }
    }
View Full Code Here


                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(currentOp);
                callContext.setCurrentAllowedStates(originalAllowedStates);
                txPolicy.commit();
            }
        }
    }

    protected void didCreateBean(ThreadContext callContext, EntityBean bean) throws OpenEJBException {
View Full Code Here

            } catch (Exception e) {
                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(orginalOperation);
                txPolicy.commit();
            }

        }
    }
View Full Code Here

            } catch (Exception e) {
                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(currentOp);
                txPolicy.commit();
            }
        }
    }

    protected void didCreateBean(ThreadContext callContext, EntityBean bean) throws OpenEJBException {
View Full Code Here

            try {
                next.evaluate();
            } catch (Throwable t) {
                if (!isApplicationException(t)) policy.setRollbackOnly();
            } finally {
                policy.commit();
            }
        }

        private boolean isApplicationException(Throwable t) {
            if (t.getClass().isAnnotationPresent(javax.ejb.ApplicationException.class)) return true;
View Full Code Here

                next.evaluate();
            } finally {

                if (annotation.rollback()) policy.setRollbackOnly();

                policy.commit();
            }
        }
    }

    public static class Interceptorss extends AnnotationStatement<Interceptors> {
View Full Code Here

                        base.evaluate();
                    } finally {
                        if (tx.rollback()) {
                            policy.setRollbackOnly();
                        }
                        policy.commit();
                    }
                }
            };
        } else {
            return new Statement() {
View Full Code Here

            } catch (final Exception e) {
                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(orginalOperation);
                txPolicy.commit();
            }

        }
    }
View Full Code Here

            } catch (final Exception e) {
                instanceManager.discardInstance(callContext, bean);
                throw e;
            } finally {
                callContext.setCurrentOperation(currentOp);
                txPolicy.commit();
            }
        }
    }

    protected void didCreateBean(final ThreadContext callContext, final EntityBean bean) throws OpenEJBException {
View Full Code Here

            } catch (final Throwable t) {
                if (!isApplicationException(t)) {
                    policy.setRollbackOnly();
                }
            } finally {
                policy.commit();
            }
        }

        private boolean isApplicationException(final Throwable t) {
            if (t.getClass().isAnnotationPresent(javax.ejb.ApplicationException.class)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.