diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java b/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
index e3daec9ac..2b1b6e744 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/api/TaskContext.java
@@ -34,12 +34,25 @@ public interface TaskContext
String NAME = "myrmidon.task.name";
/**
- * Retrieve Name of tasklet.
+ * Retrieve Name of task.
*
* @return the name
*/
String getName();
+ /**
+ * Retrieve a service that is offered by the runtime.
+ * The actual services registered and in place for the
+ * task is determined by the container. The returned service
+ * MUST implement the specified interface.
+ *
+ * @param serviceClass the interface class that defines the service
+ * @return an instance of the service implementing interface specified by parameter
+ * @exception TaskException is thrown when the service is unavailable or not supported
+ */
+ Object getService( Class serviceClass )
+ throws TaskException;
+
/**
* Retrieve base directory.
*
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
index 977a9a071..9e71cd308 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
@@ -91,6 +91,22 @@ public class DefaultTaskContext
}
}
+ /**
+ * Retrieve a service that is offered by the runtime.
+ * The actual services registered and in place for the
+ * task is determined by the container. The returned service
+ * MUST implement the specified interface.
+ *
+ * @param serviceClass the interface class that defines the service
+ * @return an instance of the service implementing interface specified by parameter
+ * @exception TaskException is thrown when the service is unavailable or not supported
+ */
+ public Object getService( final Class serviceClass )
+ throws TaskException
+ {
+ throw new TaskException( "No services available atm" );
+ }
+
/**
* Resolve filename.
* This involves resolving it against baseDirectory and