notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1510 - trunk/main/metro/runtime/src/main/net/dpml/metro/runtime
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1510 - trunk/main/metro/runtime/src/main/net/dpml/metro/runtime
- Date: Thu, 8 Jun 2006 07:00:36 +0200
Author: mcconnell
Date: 2006-06-08 07:00:12 +0200 (Thu, 08 Jun 2006)
New Revision: 1510
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
Log:
improved error messages and log level pre-checks
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-06-08 04:25:35 UTC (rev 1509)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-06-08 05:00:12 UTC (rev 1510)
@@ -578,11 +578,11 @@
catch( Exception ve )
{
final String error =
- "Unexpect error while attempting to resolve a
value from the context directive class ["
+ "Unexpected error while attempting to resolve a
value from a context directive ["
+ directive.getClass().getName()
- + "] assigned to context key ["
+ + "] assigned to key ["
+ key
- + "] in the component ["
+ + "] in component ["
+ handler.getPath()
+ "].";
throw new ControllerException( error, ve );
@@ -644,7 +644,8 @@
else
{
final String error =
- "Unsuppored context directive class: " +
directive.getClass();
+ "Unsuppored context directive class: "
+ + directive.getClass();
throw new ControllerException( error );
}
}
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-06-08 04:25:35 UTC (rev 1509)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-06-08 05:00:12 UTC (rev 1510)
@@ -660,7 +660,8 @@
synchronized( getLock() )
{
getLogger().debug( "disposal" );
- m_holder.dispose();
+ decommission();
+ //m_holder.dispose();
if( m_flag )
{
if( m_model instanceof Disposable )
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-06-08 04:25:35 UTC (rev 1509)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-06-08 05:00:12 UTC (rev 1510)
@@ -106,7 +106,9 @@
catch( UnknownKeyException e )
{
final String error =
- "Component directive does not declare a directive for the
key [" + key + "].";
+ "Component does not declare a context entry directive for
the key ["
+ + key
+ + "].";
throw new ModelException(
CompositionController.CONTROLLER_URI, error, e );
}
}
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-08 04:25:35 UTC (rev 1509)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-08 05:00:12 UTC (rev 1510)
@@ -308,11 +308,30 @@
{
m_proxy = null;
}
+
+ if( getLogger().isDebugEnabled() )
+ {
+ getLogger().debug(
+ "instantiating ["
+ + m_handler.getImplementationClass().getName()
+ + "]" );
+ }
+
m_value = m_handler.createNewObject( this );
m_tag = createTag( m_value );
- getLogger().debug( "activating instance " + m_tag );
+
+ if( getLogger().isDebugEnabled() )
+ {
+ getLogger().debug( "instantiated " + m_tag );
+ }
+
m_machine.initialize( m_value );
m_activated = true;
+
+ if( getLogger().isDebugEnabled() )
+ {
+ getLogger().debug( "activated " + m_tag );
+ }
}
}
- r1510 - trunk/main/metro/runtime/src/main/net/dpml/metro/runtime, mcconnell at BerliOS, 06/08/2006
Archive powered by MHonArc 2.6.24.