Package org.apache.openejb

Examples of org.apache.openejb.BeanContext.addApplicationException()


    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
View Full Code Here


    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
View Full Code Here

    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
        assertEquals(ExceptionType.SYSTEM, cdi.getExceptionType(new AE4()));
View Full Code Here

    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        final BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo", null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
View Full Code Here

    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        final BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo", null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
View Full Code Here

    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        final BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo", null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
        assertEquals(ExceptionType.SYSTEM, cdi.getExceptionType(new AE4()));
View Full Code Here

    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
View Full Code Here

    @Test
    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
View Full Code Here

    public void testRollback() throws Exception {
        SystemInstance.init(new Properties());
        BeanContext cdi = new BeanContext("foo", null, new ModuleContext("foo",null, "bar", new AppContext("foo", SystemInstance.get(), null, null, null, false), null, null), Object.class, null, new HashMap<String, String>());
        cdi.addApplicationException(AE1.class, true, true);
        cdi.addApplicationException(AE3.class, true, false);
        cdi.addApplicationException(AE6.class, false, true);

        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE1()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE2()));
        assertEquals(ExceptionType.APPLICATION_ROLLBACK, cdi.getExceptionType(new AE3()));
        assertEquals(ExceptionType.SYSTEM, cdi.getExceptionType(new AE4()));
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.