Package org.torquebox.core.runtime

Examples of org.torquebox.core.runtime.PoolMetaData


    public void testPoolDefinedAlready() throws Exception {
       
        DeploymentPhaseContext phaseContext = createPhaseContext();
        DeploymentUnit unit = phaseContext.getDeploymentUnit();
       
        PoolMetaData jobsPoolMetaData = new PoolMetaData( "jobs" );
        jobsPoolMetaData.setShared();
       
        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, jobsPoolMetaData );
        deploy( phaseContext );
       
        List<PoolMetaData> allPools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );
View Full Code Here


    public void testPoolDefinedAlreadyWithJobs() throws Exception {
       
        DeploymentPhaseContext phaseContext = createPhaseContext();
        DeploymentUnit unit = phaseContext.getDeploymentUnit();
       
        PoolMetaData jobsPoolMetaData = new PoolMetaData( "jobs" );
        jobsPoolMetaData.setShared();
       
        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, jobsPoolMetaData );
        unit.addToAttachmentList( ScheduledJobMetaData.ATTACHMENTS_KEY, new ScheduledJobMetaData() );
       
        deploy( phaseContext );
View Full Code Here

        deploy( phaseContext );
       
        List<PoolMetaData> allPools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );
        assertEquals( 1, allPools.size() );
       
        PoolMetaData jobPoolMetaData = allPools.get( 0 );
       
        assertEquals( "jobs", jobPoolMetaData.getName() );
        assertTrue( jobPoolMetaData.isShared() );
        assertTrue( jobPoolMetaData.isDeferUntilRequested() );
    }
View Full Code Here

                return;
            }
        }
        RubyAppMetaData envMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        boolean devMode = envMetaData != null && envMetaData.isDevelopmentMode();
        PoolMetaData pool = devMode ? new PoolMetaData( "messaging", 1, 10 ) : new PoolMetaData( "messaging" );
        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, pool );
    }
View Full Code Here

        List<PoolMetaData> pools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );

        assertFalse( pools.isEmpty() );
        assertEquals( 2, pools.size() );
       
        PoolMetaData poolOne = pools.get( 0 );
        assertNotNull( poolOne );

        assertEquals( "pool_one", poolOne.getName() );
        assertEquals( 1, poolOne.getMinimumSize() );
        assertEquals( 1, poolOne.getMaximumSize() );

        PoolMetaData poolTwo = pools.get( 1 );

        assertEquals( "pool_two", poolTwo.getName() );
        assertEquals( 10, poolTwo.getMinimumSize() );
        assertEquals( 200, poolTwo.getMaximumSize() );
    }
View Full Code Here

        List<PoolMetaData> pools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );

        assertFalse( pools.isEmpty() );
        assertEquals( 2, pools.size() );
       
        PoolMetaData poolOne = pools.get( 0 );
        assertNotNull( poolOne );
        assertEquals( "pool_one", poolOne.getName() );
        assertTrue( poolOne.isShared() );
        assertTrue( poolOne.isDeferUntilRequested() );
       
        PoolMetaData webPool = pools.get( 1 );
        assertNotNull( webPool );
        assertEquals( "web", webPool.getName() );
        assertTrue( webPool.isShared() );
        assertFalse( webPool.isDeferUntilRequested() );
    }
View Full Code Here

        List<PoolMetaData> pools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );

        assertFalse( pools.isEmpty() );
        assertEquals( 1, pools.size() );
       
        PoolMetaData poolOne = pools.get( 0 );
        assertNotNull( poolOne );
        assertEquals( "pool_one", poolOne.getName() );
        assertTrue( poolOne.isShared() );
        assertFalse( poolOne.isDeferUntilRequested() );
    }
View Full Code Here

        deploy( phaseContext );

        List<PoolMetaData> allPools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );
        assertEquals( 1, allPools.size() );

        PoolMetaData messagingPoolMetaData = allPools.get( 0 );
        assertEquals( "messaging", messagingPoolMetaData.getName() );
        assertTrue( messagingPoolMetaData.isShared() );
        assertTrue( messagingPoolMetaData.isDeferUntilRequested() );
    }
View Full Code Here

TOP

Related Classes of org.torquebox.core.runtime.PoolMetaData

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.