You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/09/11 21:13:25 UTC
cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup FortressServiceManager.java
bloritsch 2002/09/11 12:13:25
Modified: fortress build.xml default.properties
fortress/src/java/org/apache/excalibur/fortress/lookup
FortressServiceManager.java
Log:
Make Fortress build with dependencies on Container and Meta
Revision Changes Path
1.50 +3 -0 jakarta-avalon-excalibur/fortress/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/build.xml,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- build.xml 29 Aug 2002 12:12:54 -0000 1.49
+++ build.xml 11 Sep 2002 19:13:25 -0000 1.50
@@ -25,6 +25,7 @@
<pathelement location="${excalibur-sourceresolve.jar}"/>
<pathelement location="${excalibur-concurrent.jar}"/>
<pathelement location="${excalibur-container.jar}"/>
+ <pathelement location="${excalibur-meta.jar}"/>
<pathelement location="${checkstyle.jar}"/>
<pathelement path="${java.class.path}"/>
</path>
@@ -78,6 +79,7 @@
<copy file="${excalibur-sourceresolve.jar}" todir="${build.dir}/tempjars"/>
<copy file="${excalibur-concurrent.jar}" todir="${build.dir}/tempjars"/>
<copy file="${excalibur-container.jar}" todir="${build.dir}/tempjars"/>
+ <copy file="${excalibur-meta.jar}" todir="${build.dir}/tempjars"/>
<copy file="${excalibur-threadcontext.jar}" todir="${build.dir}/tempjars"/>
<copy file="${build.lib}/${jar.name}" todir="${build.dir}/tempjars"/>
<copy todir="${build.dir}/tempjars">
@@ -123,6 +125,7 @@
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkThreadcontext"/>
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogger"/>
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkContainer"/>
+ <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkMeta"/>
<ant antfile="../assembly/build.xml" target="dist" inheritAll="false"/>
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkRequiredClass">
<property name="proj.jar.name" value="xml-apis.jar"/>
1.35 +15 -0 jakarta-avalon-excalibur/fortress/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/default.properties,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- default.properties 6 Sep 2002 06:48:22 -0000 1.34
+++ default.properties 11 Sep 2002 19:13:25 -0000 1.35
@@ -22,6 +22,16 @@
excalibur-core.jar=${excalibur-core.lib}/excalibur-core.jar
excalibur-scratchpad.jar=${excalibur-core.lib}/excalibur-scratchpad.jar
+# ----- Excalibur Container -----
+excalibur-container.home=${basedir}/../container
+excalibur-container.lib=${excalibur-container.home}/build/lib
+excalibur-container.jar=${excalibur-container.lib}/excalibur-container-1.0.jar
+
+# ----- Excalibur Meta -----
+excalibur-meta.home=${basedir}/../meta
+excalibur-meta.lib=${excalibur-meta.home}/build/lib
+excalibur-meta.jar=${excalibur-meta.lib}/excalibur-meta-1.0.jar
+
# ----- Excalibur collections, version 1.0 or later -----
excalibur-collections.home=${basedir}/../collections/dist
excalibur-collections.lib=${excalibur-collections.home}
@@ -78,6 +88,11 @@
excalibur-container.home=${basedir}/../container/dist
excalibur-container.lib=${excalibur-container.home}
excalibur-container.jar=${excalibur-container.lib}/excalibur-container-1.0.jar
+
+# ----- Excalibur meta, version 1.0 or later -----
+excalibur-meta.home=${basedir}/../meta/dist
+excalibur-meta.lib=${excalibur-meta.home}
+excalibur-meta.jar=${excalibur-meta.lib}/excalibur-meta-1.0.jar
# ----- AltRMI -----
excalibur-altrmi.home=${basedir}/../altrmi/dist
1.11 +9 -40 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
Index: FortressServiceManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- FortressServiceManager.java 13 Aug 2002 07:57:27 -0000 1.10
+++ FortressServiceManager.java 11 Sep 2002 19:13:25 -0000 1.11
@@ -59,6 +59,7 @@
import org.apache.excalibur.fortress.Container;
import org.apache.excalibur.fortress.handler.ComponentHandler;
import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
+import org.apache.excalibur.container.lookup.AbstractServiceManager;
/**
* This is the Default ServiceManager for the Container. It provides
@@ -68,7 +69,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision$ $Date$
*/
-public class FortressServiceManager implements ServiceManager
+public class FortressServiceManager extends AbstractServiceManager
{
private final Container m_components;
private final BucketMap m_used;
@@ -112,6 +113,8 @@
final LifecycleExtensionManager extManager,
final Context context )
{
+ super( parent );
+
m_parent = parent;
m_components = container;
m_context = context;
@@ -124,37 +127,10 @@
}
}
- public Object lookup( String role )
+ public Object obtainService( String role )
throws ServiceException
{
- Object temp = null;
-
- try
- {
- temp = m_components.get( role, null );
- }
- catch( ServiceException ce )
- {
- /* Logic is thus:
- * If we have the component and the get threw an exception, we
- * need to report that.
- * Otherwise, do the lookup on our parent
- * Otherwise, just throw the exception
- */
- if( m_components.has( role, null ) )
- {
- throw ce;
-
- }
- else if( null != m_parent )
- {
- return m_parent.lookup( role );
- }
- else
- {
- throw ce;
- }
- }
+ Object temp = m_components.get( role, null );
if( temp instanceof ServiceSelector || temp instanceof ComponentSelector )
{
@@ -195,16 +171,9 @@
return component;
}
- public boolean hasService( String role )
+ public boolean serviceExists( String role )
{
- final boolean hasComponent = m_components.has( role, null );
-
- if( !hasComponent && null != m_parent )
- {
- return m_parent.hasService( role );
- }
-
- return hasComponent;
+ return m_components.has( role, null );
}
public void release( Object component )
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>