Examples of addAssociationDescriptor()


Examples of org.rioproject.associations.AssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociationRange() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("2.8");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = association.getServiceFuture().get();
        Assert.assertNotNull(dummy);
        Assert.assertEquals("Expected 1 got "+association.getServiceCount(), 1, association.getServiceCount());
        Assert.assertTrue("Expected \'His Other Brother Darrel\', got "+dummy.getName(), "His Other Brother Darrel".equals(dummy.getName()));
    }
View Full Code Here

Examples of org.rioproject.associations.AssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociationNoMatches() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("1.0");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = null;
        try {
            dummy = association.getServiceFuture().get(5, TimeUnit.SECONDS);
        } catch (TimeoutException e) {
            System.out.println("Received expected TimeoutException");
View Full Code Here

Examples of org.rioproject.associations.AssociationManagement.addAssociationDescriptor()

    @Test
    public void testVersionedAssociationMatchesAll() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = null;
        TimeoutException timeoutException = null;
        try {
            dummy = association.getServiceFuture().get(5, TimeUnit.SECONDS);
        } catch (TimeoutException e) {
View Full Code Here

Examples of org.rioproject.associations.AssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociations() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("2.1");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = association.getServiceFuture().get();
        Assert.assertNotNull(dummy);
        Assert.assertEquals("Expected 1 got " + association.getServiceCount(), 1, association.getServiceCount());
        Assert.assertTrue("Expected \'His Brother Darrel\', got " + dummy.getName(), "His Brother Darrel".equals(dummy.getName()));
    }
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociations() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("2.1");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = association.getServiceFuture().get();
        Assert.assertNotNull(dummy);
        Assert.assertEquals("Expected 1 got " + association.getServiceCount(), 1, association.getServiceCount());
        Assert.assertTrue("Expected \'His Brother Darrel\', got " + dummy.getName(), "His Brother Darrel".equals(dummy.getName()));
    }
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociationRange() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("2.8");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = association.getServiceFuture().get();
        Assert.assertNotNull(dummy);
        Assert.assertEquals("Expected 1 got "+association.getServiceCount(), 1, association.getServiceCount());
        Assert.assertTrue("Expected \'His Other Brother Darrel\', got "+dummy.getName(), "His Other Brother Darrel".equals(dummy.getName()));
    }
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

    public void testVersionedAssociationNoMatches() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        descriptor.setVersion("1.0");
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = null;
        try {
            dummy = association.getServiceFuture().get(5, TimeUnit.SECONDS);
        } catch (TimeoutException e) {
            System.out.println("Received expected TimeoutException");
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

    @Test
    public void testVersionedAssociationMatchesAll() throws ExecutionException, InterruptedException, IOException {
        AssociationManagement aMgr = new DefaultAssociationManagement();
        AssociationDescriptor descriptor = AssociationDescriptor.create("Dummy", Dummy.class, System.getProperty("org.rioproject.groups"));
        descriptor.setMatchOnName(false);
        Association<Dummy> association = aMgr.addAssociationDescriptor(descriptor);
        Dummy dummy = null;
        TimeoutException timeoutException = null;
        try {
            dummy = association.getServiceFuture().get(5, TimeUnit.SECONDS);
        } catch (TimeoutException e) {
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

        AssociationDescriptor descriptor = AssociationDescriptor.create("Calculator",
                                                                        Calculator.class,
                                                                        testManager.getGroups());
        /* Create association management and get the Future. */
        org.rioproject.associations.AssociationManagement aMgr = new DefaultAssociationManagement();
        Association<Calculator> association = aMgr.addAssociationDescriptor(descriptor);
        future = association.getServiceFuture();
    }

    @Test
    public void testInjectedService() throws RemoteException, ExecutionException, InterruptedException {
View Full Code Here

Examples of org.rioproject.impl.associations.DefaultAssociationManagement.addAssociationDescriptor()

        if(s!=null && s.equals("no"))
            createCoreAssociations = false;
        if(createCoreAssociations) {
            AssociationDescriptor monitor =
                createAssociationDescriptor("Monitor", context.getServiceBeanConfig().getGroups());
            Association<ProvisionMonitor> monitorAssociation = associationMgmt.addAssociationDescriptor(monitor);
            monitorFuture = monitorAssociation.getServiceFuture();
        }
    }

    @Initialized
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.