Package org.jboss.soa.esb.addressing.eprs

Examples of org.jboss.soa.esb.addressing.eprs.InVMEpr


            reg.findEPR("x", "y");
            fail("Expected ServiceNotFoundException") ;
        } catch (final ServiceNotFoundException snfe) {
        }

        reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
        assertEquals(1, reg.findEPRs("x", "y").size());
        assertEquals("x://123", reg.findEPR("x", "y").getAddr().getAddress());

        reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
        assertEquals(2, reg.findEPRs("x", "y").size());

        reg.registerEPR("a", "z", "blah", new InVMEpr(new EPR(URI.create("x://12345"))), "blah");
        assertEquals(2, reg.findEPRs("x", "y").size());
        assertEquals(1, reg.findEPRs("a", "z").size());

        assertEquals(2, reg.findAllServices().size());
        assertEquals(1, reg.findServices("x").size());

        // unreg using a valid service + registred EPR... make sure EPR is removed...
        reg.unRegisterEPR("a", "z", new InVMEpr(new EPR(URI.create("x://12345"))));
        assertEquals(0, reg.findEPRs("a", "z").size());

        // unreg all for the service
        assertEquals(2, reg.findEPRs("x", "y").size());
        reg.unRegisterService("x", "y");
View Full Code Here


        CourierFactoryUtil.resetCourierFactory();
    }

    @Test
    public void testUnthreadedDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid1"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Producer producer = new Producer(courier);
View Full Code Here

        }
    }

    @Test
    public void testThreadedDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid2"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Producer producer = new Producer(courier);
View Full Code Here

        }
    }

    @Test
    public void testDelayedThreadedDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid3"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Producer producer = new Producer(courier);
View Full Code Here

        }
    }

    @Test
    public void testThreadedNullDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid4"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Consumer consumer = new Consumer(courier);
View Full Code Here

        }
    }

    @Test
    public void testLockstepDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid5?true#2000"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Producer producer = new Producer(courier);
View Full Code Here

        }
    }
   
    @Test
    public void testPassByValueDeliver() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid5/true?true#2000"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            InVMCourier courier = new InVMCourier(epr);
            Producer producer = new Producer(courier);
View Full Code Here

    }


    @Test
    public void testLockstepMultiProducerPerformance() throws Exception {
        InVMEpr epr = new InVMEpr(new URI("invm://serviceid5?true#2000"));
        InVMTransport.getInstance().registerEPR("x", "y", epr) ;
        try
        {
            int iters = 1000;
            int numberOfProducers = 50;
View Full Code Here

        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

        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

TOP

Related Classes of org.jboss.soa.esb.addressing.eprs.InVMEpr

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.