You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/09/16 23:42:43 UTC
cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service DefaultRegistry.java Registry.java ServiceManagementContext.java
mcconnell 2002/09/16 14:42:43
Modified: assembly/src/java/org/apache/excalibur/merlin
DefaultController.java Main.java
assembly/src/java/org/apache/excalibur/merlin/assembly
ContainerManager.java
assembly/src/java/org/apache/excalibur/merlin/container
ContainerResource.java DefaultContainer.java
DefaultContainer.xinfo
assembly/src/java/org/apache/excalibur/merlin/service
DefaultRegistry.java Registry.java
ServiceManagementContext.java
Log:
Addition of "avalon:home" as a default entry into the set of candidate context
values.
Revision Changes Path
1.18 +4 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/DefaultController.java
Index: DefaultController.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/DefaultController.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- DefaultController.java 22 Aug 2002 13:43:01 -0000 1.17
+++ DefaultController.java 16 Sep 2002 21:42:42 -0000 1.18
@@ -11,6 +11,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
+import java.io.FileNotFoundException;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.activity.Startable;
@@ -159,8 +160,8 @@
final File file = new File( m_home, m_path );
if( !file.exists() )
{
- final String error = "Supplied filename does not exist. (" + file + ")";
- throw new ControllerException( error );
+ final String error = "Supplied filename does not exist: " + file;
+ throw new FileNotFoundException( error );
}
if( file.isDirectory() )
{
1.19 +6 -1 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Main.java 11 Sep 2002 11:39:25 -0000 1.18
+++ Main.java 16 Sep 2002 21:42:42 -0000 1.19
@@ -9,6 +9,7 @@
package org.apache.excalibur.merlin;
import java.io.File;
+import java.io.FileNotFoundException;
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.ExceptionUtil;
@@ -141,6 +142,10 @@
controller.contextualize( context );
controller.initialize();
controller.start();
+ }
+ catch( FileNotFoundException e )
+ {
+ System.out.println( "\n" + e.getMessage() );
}
catch( KernelException e )
{
1.35 +9 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java
Index: ContainerManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- ContainerManager.java 15 Sep 2002 00:19:36 -0000 1.34
+++ ContainerManager.java 16 Sep 2002 21:42:42 -0000 1.35
@@ -858,12 +858,18 @@
}
//
- // add some Phoenix specific stuff so we can work around context expected
- // on a BlockContext without having to modify the xinfo file
+ // add standard context entries
//
DefaultContext c = new DefaultContext( context );
+ c.put("avalon:home", m_home );
c.put("avalon:name", profile.getName() );
+
+ //
+ // add some Phoenix specific stuff so we can work around context expected
+ // on a BlockContext without having to modify the xinfo file
+ //
+
c.put("name", profile.getName() );
c.put("block.name", getPath().replace('/','.').substring(1)
+ "." + profile.getName() );
1.2 +7 -5 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerResource.java
Index: ContainerResource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerResource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ContainerResource.java 31 Aug 2002 14:48:08 -0000 1.1
+++ ContainerResource.java 16 Sep 2002 21:42:42 -0000 1.2
@@ -201,9 +201,11 @@
{
if( m_installable.size() > 0 )
{
- if(( m_state == StateEvent.INITIALIZED ) || ( m_state == StateEvent.SUSPENDED ))
+ if(( m_state == StateEvent.INITIALIZED )
+ || ( m_state == StateEvent.SUSPENDED ))
{
- m_container.install( (Profile[]) m_installable.toArray( new Profile[0] ) );
+ m_container.install(
+ (Profile[]) m_installable.toArray( new Profile[0] ) );
m_installable.clear();
}
}
@@ -236,7 +238,8 @@
}
break;
case StateEvent.STOPPED:
- if(( m_state == StateEvent.STARTED ) || ( m_state == StateEvent.SUSPENDED ))
+ if(( m_state == StateEvent.STARTED )
+ || ( m_state == StateEvent.SUSPENDED ))
{
m_container.stop();
}
@@ -425,7 +428,6 @@
}
}
}
-
/**
1.41 +3 -1 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java
Index: DefaultContainer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- DefaultContainer.java 9 Sep 2002 13:34:50 -0000 1.40
+++ DefaultContainer.java 16 Sep 2002 21:42:42 -0000 1.41
@@ -337,6 +337,8 @@
"Container has already passed through start phase.");
}
+ getLogger().info("initiating startup of local components.");
+
//
// request startup of any unstarted components
//
1.16 +0 -6 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.xinfo
Index: DefaultContainer.xinfo
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.xinfo,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultContainer.xinfo 13 Sep 2002 15:08:07 -0000 1.15
+++ DefaultContainer.xinfo 16 Sep 2002 21:42:42 -0000 1.16
@@ -36,12 +36,6 @@
optional="true"/>
</context>
- <services>
- <service>
- <reference type="org.apache.excalibur.merlin.container.Container" version="1.0"/>
- </service>
- </services>
-
<stages>
<stage>
<reference type="org.apache.excalibur.merlin.container.Structural"/>
1.4 +5 -1 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/DefaultRegistry.java
Index: DefaultRegistry.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/DefaultRegistry.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultRegistry.java 15 Sep 2002 00:19:37 -0000 1.3
+++ DefaultRegistry.java 16 Sep 2002 21:42:42 -0000 1.4
@@ -257,6 +257,10 @@
}
}
+ //=======================================================================
+ // implementation
+ //=======================================================================
+
/**
* Returns a list of published resources.
* @return the resources
1.3 +2 -25 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/Registry.java
Index: Registry.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/Registry.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Registry.java 11 Sep 2002 06:57:24 -0000 1.2
+++ Registry.java 16 Sep 2002 21:42:42 -0000 1.3
@@ -18,14 +18,8 @@
* @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
* @version $Revision$ $Date$
*/
-public interface Registry
+public interface Registry extends ServicePublisher
{
- /**
- * Returns the base context URL.
- *
- * @return the context url
- */
- public URL getBase();
/**
* Creation of a subsidiary service context.
@@ -49,23 +43,6 @@
* @param resource the resource
*/
public void unbind( Resource resource );
-
- /**
- * Select a set of service based on a supplied filter. A filter is
- * supplied in the form of a String. Interpritation of string follows
- * normal URI semantics (path, query, and reference elements are protocol
- * dependent).
- *
- * @param uri the service uri
- * @exception Exception is an install error occurs
- */
- Resource locate( String uri ) throws UnknownServiceException, InvalidPathException;
-
- /**
- * Returns a list of published resources.
- * @return the set of published resources
- */
- Resource[] getResources( );
}
1.5 +2 -20 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceManagementContext.java
Index: ServiceManagementContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceManagementContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServiceManagementContext.java 8 Sep 2002 14:36:56 -0000 1.4
+++ ServiceManagementContext.java 16 Sep 2002 21:42:42 -0000 1.5
@@ -18,14 +18,8 @@
* @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
* @version $Revision$ $Date$
*/
-public interface ServiceManagementContext
+public interface ServiceManagementContext extends ServiceLocator
{
- /**
- * Returns the base context URL.
- *
- * @return the context url
- */
- public URL getBase();
/**
* Creation of a subsidiary service context.
@@ -49,18 +43,6 @@
* @param resource the resource
*/
public void unbind( Resource resource );
-
- /**
- * Select a set of service based on a supplied filter. A filter is
- * supplied in the form of a String. Interpritation of string follows
- * normal URI semantics (path, query, and reference elements are protocol
- * dependent).
- *
- * @param uri the service uri
- * @exception Exception is an install error occurs
- */
- Resource locate( String uri ) throws UnknownServiceException, InvalidPathException;
-
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>