You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@excalibur.apache.org by ha...@apache.org on 2004/07/09 00:41:08 UTC
svn commit: rev 22738 - in excalibur/branches/fortress-experiments: bean container-impl/src/java/org/apache/avalon/fortress/impl/interceptor container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/components
Author: hammett
Date: Thu Jul 8 15:41:07 2004
New Revision: 22738
Modified:
excalibur/branches/fortress-experiments/bean/project.properties
excalibur/branches/fortress-experiments/container-impl/src/java/org/apache/avalon/fortress/impl/interceptor/DefaultInterceptorManager.java
excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/DefaultInterceptorManagerTestCase.java
excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/components/CustomerDataAccessObject.java
Log:
More test cases needed!
Modified: excalibur/branches/fortress-experiments/bean/project.properties
==============================================================================
--- excalibur/branches/fortress-experiments/bean/project.properties (original)
+++ excalibur/branches/fortress-experiments/bean/project.properties Thu Jul 8 15:41:07 2004
@@ -23,3 +23,5 @@
# gump integration
project.name=excalibur-fortress-bean
+
+maven.junit.fork=true
Modified: excalibur/branches/fortress-experiments/container-impl/src/java/org/apache/avalon/fortress/impl/interceptor/DefaultInterceptorManager.java
==============================================================================
--- excalibur/branches/fortress-experiments/container-impl/src/java/org/apache/avalon/fortress/impl/interceptor/DefaultInterceptorManager.java (original)
+++ excalibur/branches/fortress-experiments/container-impl/src/java/org/apache/avalon/fortress/impl/interceptor/DefaultInterceptorManager.java Thu Jul 8 15:41:07 2004
@@ -23,6 +23,7 @@
import org.apache.avalon.fortress.Container;
import org.apache.avalon.fortress.ContainerListener;
import org.apache.avalon.fortress.MetaInfoEntry;
+import org.apache.avalon.fortress.MetaInfoManager;
import org.apache.avalon.fortress.interceptor.Interceptor;
import org.apache.avalon.fortress.interceptor.InterceptorManager;
import org.apache.avalon.fortress.interceptor.InterceptorManagerException;
@@ -49,6 +50,8 @@
private Container m_container;
private final Map m_families;
+
+ private MetaInfoManager m_metaManager;
///
/// Constructors
@@ -146,6 +149,14 @@
*/
public Object componentCreated( final MetaInfoEntry entry, final Object instance )
{
+ try
+ {
+ m_metaManager = (MetaInfoManager) m_container.get( MetaInfoManager.ROLE, null );
+ }
+ catch(Exception ex)
+ {
+ }
+
return instance;
}
Modified: excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/DefaultInterceptorManagerTestCase.java
==============================================================================
--- excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/DefaultInterceptorManagerTestCase.java (original)
+++ excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/DefaultInterceptorManagerTestCase.java Thu Jul 8 15:41:07 2004
@@ -21,6 +21,7 @@
import org.apache.avalon.fortress.impl.DefaultContainerManager;
import org.apache.avalon.fortress.impl.InterceptorEnabledContainer;
import org.apache.avalon.fortress.impl.interceptor.TailInterceptor;
+import org.apache.avalon.fortress.impl.interceptor.test.components.CustomerDataAccessObject;
import org.apache.avalon.fortress.impl.interceptor.test.examples.ValidInterceptor;
import org.apache.avalon.fortress.interceptor.Interceptor;
import org.apache.avalon.fortress.interceptor.InterceptorManager;
@@ -117,4 +118,14 @@
return (InterceptorEnabledContainer) cm.getContainer();
}
+
+ public void testGetComponent() throws Exception
+ {
+ testAddInterceptor();
+
+ m_container.get( CustomerDataAccessObject.ROLE, "*" );
+
+
+ }
+
}
Modified: excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/components/CustomerDataAccessObject.java
==============================================================================
--- excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/components/CustomerDataAccessObject.java (original)
+++ excalibur/branches/fortress-experiments/container-test/src/test/org/apache/avalon/fortress/impl/interceptor/test/components/CustomerDataAccessObject.java Thu Jul 8 15:41:07 2004
@@ -24,5 +24,5 @@
*/
public interface CustomerDataAccessObject extends DataAccessObject
{
-
+ static String ROLE = CustomerDataAccessObject.class.getName();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: scm-unsubscribe@excalibur.apache.org
For additional commands, e-mail: scm-help@excalibur.apache.org