1 50 package org.apache.avalon.fortress.examples.extended; 51 52 import org.apache.avalon.fortress.examples.extended.components.ExtendedComponent; 53 import org.apache.avalon.fortress.impl.DefaultContainer; 54 55 public final class ExtendedContainer 56 extends DefaultContainer 57 { 58 public void doLookups() 59 throws Exception 60 { 61 getLogger().info( "Starting lookup of custom component" ); 62 63 for( int i = 0; i < 10; ++i ) 64 { 65 ExtendedComponent comp = (ExtendedComponent)m_serviceManager.lookup( ExtendedComponent.ROLE ); 66 m_serviceManager.release( comp ); 67 } 68 69 getLogger().info( "Finished lookups of custom component" ); 70 } 71 } 72 73 | Popular Tags |