Package org.jboss.internal.soa.esb.services.registry

Examples of org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor


        }
    }

    @Test
    public void test_JBESB_2108_01() throws ServiceNotFoundException, RegistryException {
        InVMRegistryInterceptor reg = new InVMRegistryInterceptor();
        try
        {
            reg.setRegistry(new MockRegistry()) ;
   
            reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
   
            EPR eprFromReg = reg.findEPR("x", "y");
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "y").size()) ;
   
            // Register the EPR again...
            reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
            Assert.assertEquals("InVM EPR count", 2, InVMTransport.getInstance().findEPRs("x", "y").size()) ;
   
            // Unregister it once...
            reg.unRegisterEPR("x", "y", new InVMEpr(new EPR(URI.create("x://123"))));
   
            // Should still be able to find it...
            reg.findEPR("x", "y");
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "y").size()) ;
   
            // Unregister it again...
            reg.unRegisterEPR("x", "y", new InVMEpr(new EPR(URI.create("x://123"))));
   
            Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("x", "y").size()) ;
        }
        finally
        {
View Full Code Here


    }

    @Test
    public void test_JBESB_2108_02() throws ServiceNotFoundException, RegistryException {
        // KEV
        InVMRegistryInterceptor reg = new InVMRegistryInterceptor();
        try
        {
            reg.setRegistry(new MockRegistry()) ;
   
            reg.registerEPR("xy", "z", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
            try {
                reg.registerEPR("x", "yz", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
                Assert.fail("Expected RegistryException");
            } catch (RegistryException e) {} // expected
        }
        finally
        {
View Full Code Here

        }
    }

    @Test
    public void test_JBESB_2108_03() throws ServiceNotFoundException, RegistryException {
        InVMRegistryInterceptor reg = new InVMRegistryInterceptor();
        try
        {
            EPR xy_z = new InVMEpr(new EPR(URI.create("x://123")));
            EPR x_yz = new InVMEpr(new EPR(URI.create("x://1234")));
            reg.setRegistry(new MockRegistry()) ;
   
            // Register "xy:z"...
            reg.registerEPR("xy", "z", "blah", xy_z, "blah");
            Assert.assertEquals(xy_z, reg.findEPR("xy", "z"));
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
            Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
   
            // Register "x:yz"...
            reg.registerEPR("x", "yz", "blah", x_yz, "blah");
            Assert.assertEquals(x_yz, reg.findEPR("x", "yz"));
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
   
            // Unregister "xy:z"...
            reg.unRegisterEPR("xy", "z", xy_z);
            Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
            Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
   
            // Unregister "x:yz"...
            reg.unRegisterEPR("x", "yz", x_yz);
            Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
            Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
        }
        finally
        {
View Full Code Here

TOP

Related Classes of org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor

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.