ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Murdoch <adammurd...@apache.org>
Subject Re: [myrmidon] Deployer
Date Thu, 20 Jun 2002 06:44:56 GMT
On Thu, 20 Jun 2002 09:40, Peter Donald wrote:
> At 01:19 PM 6/19/2002 +1000, you wrote:
> >On Wed, 19 Jun 2002 09:30, Peter Donald wrote:
> > > On Tue, 18 Jun 2002 19:11, Adam Murdoch wrote:
> > > > > This would allow us work with a single deployer across whole
> > > > > runtime. This deployer would then access the
> > > > > TypeManager/RoleRegistry from TaskContext.getService() and it
> > > > > "feels" a lot nicer.
> > > > >
> > > > > Thoughts?
> > > >
> > > > I was thinking the same thing.  Maybe ExecutionFrame would be a
> > > > better option than TaskContext?
> > >
> > > I would prefer to couple onto TaskContext because thats a "stable"
> > > interface and it is available to all tasks.
> >
> >Fair enough.  Should we change Executor to use TaskContext as well, then?
>
> Without looking at the code - that could be a good idea.
> Originally there was no ExecutionFrame - only a TaskContext. But I
> separated out the two so that the ExecutionFrame could have more container
> specific info attached to it. However as everything is a service now - it
> may not be so much of an issue.

DefaultExecutor will need some way of getting the task path from TaskContext, 
to use in the start/finish events.  TaskContext.getName() returns the task 
name, not the path.  Maybe changing TaskContext.getName() to return the path 
would be a good thing to do.

> The one sticking point being that we should not make the task writer deal
> with creating child instances of TaskContext as the logic is a bit hectic.
> So maybe we could create a service to manage the creation of child
> contexts. Then again that seems hacky. Not sure - what do you think?

A service seems reasonable - it would let a non-privileged task create child 
execution frames, without ever needing to access the execution frame itself.

The service could also provide a way to create new workspace-level execution 
frames, to kick off builds in other workspaces, eg

TaskContextManager contextMgr = ...
TaskContext newContext = contextMgr.createContext( ... );
Workspace workspace = (Workspace)newContext.getService( Workspace.class );
workspace.execute( project, target );


-- 
Adam

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message