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

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


  public static void scenarioThree() throws ConfigurationException, URISyntaxException, JAXRException, RegistryException {
    JAXRRegistryImpl registry = new JAXRRegistryImpl();
    Service s1 = registry.registerService(TEST_SERVICE_CATEGORY, TEST_SERVICE_NAME+"3", TEST_SERVICE_DESC);
    Service s2 = registry.registerService(TEST_SERVICE_CATEGORY, TEST_SERVICE_NAME+"3", TEST_SERVICE_DESC)
   
    InVMEpr epr3 = new InVMEpr(new URI("invm://service1epr1"));
    InVMEpr epr4 = new InVMEpr(new URI("invm://service1epr2"));
    registerEPR(registry, s2, epr3, "epr1");
    registerEPR(registry, s2, epr4, "epr2");   
  }
View Full Code Here


  public static void scenarioFour() throws ConfigurationException, URISyntaxException, JAXRException, RegistryException {
    JAXRRegistryImpl registry = new JAXRRegistryImpl();
    Service s1 = registry.registerService(TEST_SERVICE_CATEGORY, TEST_SERVICE_NAME+"4", TEST_SERVICE_DESC);
    Service s2 = registry.registerService(TEST_SERVICE_CATEGORY, TEST_SERVICE_NAME+"4second", TEST_SERVICE_DESC);
    InVMEpr epr3 = new InVMEpr(new URI("invm://service1epr1"));
    InVMEpr epr4 = new InVMEpr(new URI("invm://service1epr2"));
    registerEPR(registry, s1, epr3, "epr1");
    registerEPR(registry, s1, epr4, "epr2");   
  }
View Full Code Here

    public void test_passByRef() throws Throwable {
        test(false);
    }

    public void test(boolean passByVal) throws Throwable {
        InVMEpr epr = new InVMEpr(new URI("invm://service"));
        Message message = MessageFactory.getInstance().getMessage();

        epr.setPassByValue(passByVal);
        MockInVMXAResource resource = new MockInVMXAResource(epr, InVMTransport.toDeliveryObject(message, epr.getPassByValue()), InVMXAResource.Operation.REMOVE);

        // In reality, a new XAResource would be created for each retry, but it's the underlying
        // message that matters, so we just need to create 1 instance of MockInVMXAResource and
        // retry the rollback multiple times...
        resource.rollback(null);
View Full Code Here

    @Test
    public void testRegistration()
        throws Exception
    {
        final InVMTransport transport = new InVMTransport() ;
        final InVMEpr epr1 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY1, TEST_NAME1))) ;
        final InVMEpr epr2 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY2, TEST_NAME2))) ;
        final InVMEpr epr3 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY2, TEST_NAME2))) ;
        final InVMEpr epr4 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY2, TEST_NAME2))) ;
       
        Assert.assertEquals("All services count", 0, transport.findAllServices().size()) ;
        Assert.assertEquals("Category count", 0, transport.findServices(TEST_CATEGORY1).size()) ;
        Assert.assertEquals("Category count", 0, transport.findServices(TEST_CATEGORY2).size()) ;
       
View Full Code Here

    @Test
    public void testMissingServices()
        throws Exception
    {
        final InVMTransport transport = new InVMTransport() ;
        final InVMEpr epr1 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY1, TEST_NAME1))) ;
        final InVMEpr epr2 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://" + InVMEpr.createEncodedServiceId(TEST_CATEGORY1, TEST_NAME2))) ;
       
        try
        {
            transport.unRegisterEPR(TEST_CATEGORY1, TEST_NAME1, epr1) ;
            Assert.fail("Expected ServiceNotFoundException") ;
View Full Code Here

            System.setProperty(Environment.INVM_EXPIRY_TIME, Long.toString(expiryTime)) ;
            final InVMTemporaryTransport transport = new InVMTemporaryTransport() ;
            transport.startReaper() ;
            try
            {
                final InVMEpr epr = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr1")) ;
                final Message message = MessageFactory.getInstance().getMessage() ;
               
                Assert.assertEquals("Ordered entry size", 0, transport.getOrderedEntriesSize()) ;
                Assert.assertEquals("Service id size", 0, transport.getServiceIdToEntrySize()) ;
               
View Full Code Here

            System.setProperty(Environment.INVM_EXPIRY_TIME, Long.toString(expiryTime)) ;
            final InVMTemporaryTransport transport = new InVMTemporaryTransport() ;
            transport.startReaper() ;
            try
            {
                final InVMEpr epr = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr1")) ;
                final Message message = MessageFactory.getInstance().getMessage() ;
               
                Assert.assertEquals("Ordered entry size", 0, transport.getOrderedEntriesSize()) ;
                Assert.assertEquals("Service id size", 0, transport.getServiceIdToEntrySize()) ;
               
View Full Code Here

            System.setProperty(Environment.INVM_EXPIRY_TIME, Long.toString(expiryTime)) ;
            final InVMTemporaryTransport transport = new InVMTemporaryTransport() ;
            transport.startReaper() ;
            try
            {
                final InVMEpr epr1 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr1")) ;
                final InVMEpr epr2 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr2")) ;
                final InVMEpr epr3 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr3")) ;
                final InVMEpr epr4 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr4")) ;
                final InVMEpr epr5 = new InVMEpr(URI.create(InVMEpr.INVM_PROTOCOL + "://epr5")) ;
                final Message message = MessageFactory.getInstance().getMessage() ;
               
                Assert.assertEquals("Ordered entry size", 0, transport.getOrderedEntriesSize()) ;
                Assert.assertEquals("Service id size", 0, transport.getServiceIdToEntrySize()) ;
               
View Full Code Here

  public void testConstructor ()
  {
    try
    {
      new InVMEpr(new URI("invm://myservice?true#1234"));
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
View Full Code Here

       
        public void testPassByValue()
        {
                try
                {
                        InVMEpr epr = new InVMEpr(new URI("invm://myservice/true?true#1234"));
                       
                        assertEquals(epr.getPassByValue(), true);
                }
                catch (Exception ex)
                {
                        fail(ex.toString());
                }
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.