You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2002/05/28 04:00:30 UTC
cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
donaldp 02/05/27 19:00:30
Modified: container/src/java/org/apache/myrmidon/interfaces/executor
DefaultExecutionFrame.java
Log:
Ugly hack to put PropertyStore into ServiceManager.
We really need to get a ServiceRegistry happening ;)
Revision Changes Path
1.3 +3 -1 jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/DefaultExecutionFrame.java
Index: DefaultExecutionFrame.java
===================================================================
RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/DefaultExecutionFrame.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultExecutionFrame.java 11 May 2002 12:44:00 -0000 1.2
+++ DefaultExecutionFrame.java 28 May 2002 02:00:30 -0000 1.3
@@ -10,6 +10,7 @@
import java.io.File;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.DefaultServiceManager;
import org.apache.myrmidon.interfaces.event.TaskEventManager;
import org.apache.myrmidon.interfaces.property.PropertyStore;
@@ -17,7 +18,7 @@
* Frames in which tasks are executed.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.2 $ $Date: 2002/05/11 12:44:00 $
+ * @version $Revision: 1.3 $ $Date: 2002/05/28 02:00:30 $
*/
public class DefaultExecutionFrame
implements ExecutionFrame
@@ -42,6 +43,7 @@
m_propertyStore = propertyStore;
m_serviceManager = serviceManager;
m_eventManager = eventManager;
+ ( (DefaultServiceManager)serviceManager ).put( PropertyStore.ROLE, propertyStore );
}
/**
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Peter Donald <pe...@apache.org>.
On Tue, 28 May 2002 17:58, Adam Murdoch wrote:
> Something else that might be useful, is info about which scope the service
> should be instantiated in. eg, some services need to be created in the
> root execution frame, others only make sense per-workspace, or per-project
> (or per-task even).
yep.
> And would ExecutionFrame be basically a thin wrapper around a ServiceKernel
> (and ServiceRegistry)?
maybe - have to see how it turns out ;)
--
Cheers,
Peter Donald
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Adam Murdoch <ad...@apache.org>.
On Tue, 28 May 2002 16:17, Peter Donald wrote:
> On Tue, 28 May 2002 15:57, Adam Murdoch wrote:
> > > yep - Thats why I said it was UGLY ;) It still works (as the
> > > MSServiceManager gets wrapped in DSM later) but I am in middle of
> > > reorganizing that stuff.
> >
> > So why does the property store need to be a service?
>
> Why not? ;)
Hmm, good question. I guess there's no reason why not.
> > > > What did you have in mind?
> > >
> > > Basically I was thinking that you should be able to pass
> > > * some metainfo object (ie info about type)
> > > * some metadata object (ie instance about instance)
> >
> > What are some examples of the kind of info we'd need?
>
> Mainly the roles that the component implements and the roles that the
> component requires. We could add cutesy stuff in there aswell (like
> versioning etc) but that is secondary to the other bits IMO.
Something else that might be useful, is info about which scope the service
should be instantiated in. eg, some services need to be created in the root
execution frame, others only make sense per-workspace, or per-project (or
per-task even).
> > > The ServiceRegistry interface is just the "writing" counterpart to
> > > ServiceManager (like TypeRegistry/TypeManager etc).
> >
> > Ok. Would this be a scoped service?
>
> Not sure - probably it would be just an interface into ServiceKernel which
> would be scoped .. maybe (not sure yet - need to play).
And would ExecutionFrame be basically a thin wrapper around a ServiceKernel
(and ServiceRegistry)?
--
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Peter Donald <pe...@apache.org>.
On Tue, 28 May 2002 15:57, Adam Murdoch wrote:
> > yep - Thats why I said it was UGLY ;) It still works (as the
> > MSServiceManager gets wrapped in DSM later) but I am in middle of
> > reorganizing that stuff.
>
> So why does the property store need to be a service?
Why not? ;)
I thought it would be good to make it a service as then everything is
homogenized.
> > > What did you have in mind?
> >
> > Basically I was thinking that you should be able to pass
> > * some metainfo object (ie info about type)
> > * some metadata object (ie instance about instance)
>
> What are some examples of the kind of info we'd need?
Mainly the roles that the component implements and the roles that the
component requires. We could add cutesy stuff in there aswell (like
versioning etc) but that is secondary to the other bits IMO.
>
> > The ServiceRegistry interface is just the "writing" counterpart to
> > ServiceManager (like TypeRegistry/TypeManager etc).
>
> Ok. Would this be a scoped service?
Not sure - probably it would be just an interface into ServiceKernel which
would be scoped .. maybe (not sure yet - need to play).
> One thing we need (and I'm not sure
> if ServiceRegistry is a good candidate) is some way to mess with the
> services contained in an execution frame - eg when creating a child
> execution frame, we need some way of adding new services, overriding
> others, and hiding others.
agreed.
> Another thing that would be nice (this is more of a ServiceKernel thing) is
> to provide a hook so that a service can hand off the management of nested
> services to the kernel.
Sounds good. So each service is capable of being a container and if they
follow some rules they can reuse infrastructure. This is actually the way
Bluestones/HPs CSF (Core Services Framework) works (except they have a supped
up server orientated version).
> We have a few aggregate services, eg the vfs, with
> nested providers, or the deployer, with nested type deployers. The
> extension manager should probably be an aggregate service, too. Currently,
> each aggregate service has to manage the whole locate, instantiate,
> configure, initialise, cleanup lifecycle thing. All they really need is
> something they hand a {role, type-name} to, and receive back a ready-to-use
> instance, that is private to the service and gets cleaned up when the
> service does.
>
> Anything we can reuse from avalon to do this?
Probably - it will require a little bit of code wrangling but it should be
possible.
--
Cheers,
Peter Donald
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Adam Murdoch <ad...@apache.org>.
On Tue, 28 May 2002 13:41, Peter Donald wrote:
> On Tue, 28 May 2002 13:20, Adam Murdoch wrote:
> > On Tue, 28 May 2002 12:00, donaldp@apache.org wrote:
> > > donaldp 02/05/27 19:00:30
> > >
> > > Modified:
> > > container/src/java/org/apache/myrmidon/interfaces/executor
> > > DefaultExecutionFrame.java
> > > Log:
> > > Ugly hack to put PropertyStore into ServiceManager.
> >
> > Eww. What do we need this for? The cast to DefaultServiceManager breaks
> > stuff, eg the ServiceManager used in
> > DefaultEmbeddor.createExecutionFrame() is a MultiSourceServiceManager.
>
> yep - Thats why I said it was UGLY ;) It still works (as the
> MSServiceManager gets wrapped in DSM later) but I am in middle of
> reorganizing that stuff.
So why does the property store need to be a service?
> > > We really need to get a ServiceRegistry happening ;)
> >
> > What did you have in mind?
>
> Basically I was thinking that you should be able to pass
> * some metainfo object (ie info about type)
> * some metadata object (ie instance about instance)
What are some examples of the kind of info we'd need?
> The ServiceRegistry interface is just the "writing" counterpart to
> ServiceManager (like TypeRegistry/TypeManager etc).
Ok. Would this be a scoped service? One thing we need (and I'm not sure if
ServiceRegistry is a good candidate) is some way to mess with the services
contained in an execution frame - eg when creating a child execution frame,
we need some way of adding new services, overriding others, and hiding
others.
Another thing that would be nice (this is more of a ServiceKernel thing) is to
provide a hook so that a service can hand off the management of nested
services to the kernel. We have a few aggregate services, eg the vfs, with
nested providers, or the deployer, with nested type deployers. The extension
manager should probably be an aggregate service, too. Currently, each
aggregate service has to manage the whole locate, instantiate, configure,
initialise, cleanup lifecycle thing. All they really need is something they
hand a {role, type-name} to, and receive back a ready-to-use instance, that
is private to the service and gets cleaned up when the service does.
Anything we can reuse from avalon to do this?
--
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Peter Donald <pe...@apache.org>.
On Tue, 28 May 2002 13:20, Adam Murdoch wrote:
> On Tue, 28 May 2002 12:00, donaldp@apache.org wrote:
> > donaldp 02/05/27 19:00:30
> >
> > Modified: container/src/java/org/apache/myrmidon/interfaces/executor
> > DefaultExecutionFrame.java
> > Log:
> > Ugly hack to put PropertyStore into ServiceManager.
>
> Eww. What do we need this for? The cast to DefaultServiceManager breaks
> stuff, eg the ServiceManager used in DefaultEmbeddor.createExecutionFrame()
> is a MultiSourceServiceManager.
yep - Thats why I said it was UGLY ;) It still works (as the MSServiceManager
gets wrapped in DSM later) but I am in middle of reorganizing that stuff.
> > We really need to get a ServiceRegistry happening ;)
>
> What did you have in mind?
Basically I was thinking that you should be able to pass
* some metainfo object (ie info about type)
* some metadata object (ie instance about instance)
* some factory/locator object (to create component though this could be munged
into metadata)
and the ServiceKernel would create the set of Services in each "scope" and
manage them all from there in a graceful manner.
The ServiceRegistry interface is just the "writing" counterpart to
ServiceManager (like TypeRegistry/TypeManager etc).
--
Cheers,
Peter Donald
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor DefaultExecutionFrame.java
Posted by Adam Murdoch <ad...@apache.org>.
On Tue, 28 May 2002 12:00, donaldp@apache.org wrote:
> donaldp 02/05/27 19:00:30
>
> Modified: container/src/java/org/apache/myrmidon/interfaces/executor
> DefaultExecutionFrame.java
> Log:
> Ugly hack to put PropertyStore into ServiceManager.
Eww. What do we need this for? The cast to DefaultServiceManager breaks
stuff, eg the ServiceManager used in DefaultEmbeddor.createExecutionFrame()
is a MultiSourceServiceManager.
> We really need to get a ServiceRegistry happening ;)
What did you have in mind?
--
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>