donaldp 02/01/25 14:18:27
Modified: src/java/org/apache/avalon/phoenix/tools/infobuilder
Resources.properties BlockInfoBuilder.java
src/java/org/apache/avalon/phoenix/metainfo BlockInfo.java
src/java/org/apache/avalon/phoenix/components/application
LifecycleHelper.java
Log:
Replace the blockinfo <management> section with <management-access-points>
and give warnings on old forms.
Revision Changes Path
1.3 +1 -0
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/Resources.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Resources.properties 9 Nov 2001 21:14:31 -0000 1.2
+++ Resources.properties 25 Jan 2002 22:18:27 -0000 1.3
@@ -2,3 +2,4 @@
missing-block=Warning: Unspecified <block/> section in BlockInfo for class
{0}.
redundent-role=Warning: BlockInfo for class {0} redundently specifies role
name "{1}" in dependency when it is identical to the name of service. It is
recomended that the <role/> section be elided.
creating-blockinfo=Creating a BlockInfo for class "{0}".
+deprecated-management-declaration=The BlockInfo for "{0}" uses the
deprecated mechanism to declare management services. It is recomended you
replace <management> with <management-access-points>.
\ No newline at end of file
1.9 +10 -0
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/BlockInfoBuilder.java
Index: BlockInfoBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/infobuilder/BlockInfoBuilder.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BlockInfoBuilder.java 12 Jan 2002 02:40:06 -0000 1.8
+++ BlockInfoBuilder.java 25 Jan 2002 22:18:27 -0000 1.9
@@ -56,6 +56,16 @@
final ServiceDescriptor[] services = buildServices( configuration );
configuration = info.getChild( "management" );
+ if( 0 != configuration.getChildren().length )
+ {
+ final String message = REZ.getString(
"deprecated-management-declaration", classname );
+ System.err.println( message );
+ getLogger().warn( message );
+ }
+ else
+ {
+ configuration = info.getChild( "management-access-points" );
+ }
final ServiceDescriptor[] management = buildServices( configuration
);
configuration = info.getChild( "dependencies" );
1.9 +6 -6
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metainfo/BlockInfo.java
Index: BlockInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metainfo/BlockInfo.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BlockInfo.java 12 Jan 2002 02:08:01 -0000 1.8
+++ BlockInfo.java 25 Jan 2002 22:18:27 -0000 1.9
@@ -23,7 +23,7 @@
{
private final BlockDescriptor m_descriptor;
private final ServiceDescriptor[] m_services;
- private final ServiceDescriptor[] m_management;
+ private final ServiceDescriptor[] m_managementAccessPoints;
private final DependencyDescriptor[] m_dependencies;
/**
@@ -31,12 +31,12 @@
*/
public BlockInfo( final BlockDescriptor descriptor,
final ServiceDescriptor[] services,
- final ServiceDescriptor[] management,
+ final ServiceDescriptor[] managementAccessPoints,
final DependencyDescriptor[] dependencies )
{
m_descriptor = descriptor;
m_services = services;
- m_management = management;
+ m_managementAccessPoints = managementAccessPoints;
m_dependencies = dependencies;
}
@@ -65,11 +65,11 @@
/**
* This returns a list of Services that this block can be Managed by.
*
- * @return an array of Management Services
+ * @return an array of Management Access Points (management services)
*/
- public ServiceDescriptor[] getManagement()
+ public ServiceDescriptor[] getManagementAccessPoints()
{
- return m_management;
+ return m_managementAccessPoints;
}
/**
1.27 +2 -2
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/LifecycleHelper.java
Index: LifecycleHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/LifecycleHelper.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- LifecycleHelper.java 12 Jan 2002 02:29:57 -0000 1.26
+++ LifecycleHelper.java 25 Jan 2002 22:18:27 -0000 1.27
@@ -319,7 +319,7 @@
final Block block )
throws CascadingException
{
- final ServiceDescriptor[] services =
metaData.getBlockInfo().getManagement();
+ final ServiceDescriptor[] services =
metaData.getBlockInfo().getManagementAccessPoints();
final String name = metaData.getName();
final ClassLoader classLoader = block.getClass().getClassLoader();
@@ -349,7 +349,7 @@
private void unexportBlock( final BlockMetaData metaData,
final Block block )
{
- final ServiceDescriptor[] services =
metaData.getBlockInfo().getManagement();
+ final ServiceDescriptor[] services =
metaData.getBlockInfo().getManagementAccessPoints();
final String name = metaData.getName();
final ClassLoader classLoader = block.getClass().getClassLoader();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>