Re: Booting an SCA app without creating an scdl file

2006-08-10 Thread David Wheeler

I wasn't planning on defining a custom runtime, only setting up a runtime by
passing the information currently contained in the defualt.scdl file
directly to the loader, bypassing the file system.

What I am trying to do is create all the classes and interfaces for the
system in memory, and then pass those to the launcher in order to start the
runtime.

On 8/9/06, Jim Marino [EMAIL PROTECTED] wrote:


Hi David,

Yes, you should be able to do this, although you may need to create
your own Bootstrapper implementation as opposed to
DefaultBootstrapper. Depending on what you want to do, you can either
create an in memory representation of the model, passing it to the
Deployer system service or you can create one of the subclasses of
SCAObject and pass it to CompositeComponent.register() if you want to
avoid the model altogether and do something like PicoContainer
(http://www.picocontainer.org/). If you opt for the latter you will
be responsible for wiring.

The above assumes you want to essentially create a custom runtime
distribution. If your goal is to dynamically bind something from some
type of instrumentation, then that would best be done through a
management API that hasn't been defined but which people have talked
about.

The custom runtime option will likely not work from application code
as the system classloaders are isolated.  Also, in Dependency
Injection-based systems, I generally find dynamic binding to be an
anti-pattern that is best avoided through configuration.

Perhaps you could detail a little more what you are trying to do?
Also, if you wanted to talk about a potential management API, I know
several of us would be interested.

Jim


On Aug 9, 2006, at 2:49 PM, David Wheeler wrote:

 I'm trying to dynamically define a service based on an interface
 and I was
 wondering,
 Is there currently a way to pass the description of an SCA application
 directly rather than passing the information through the defualt.scdl?

 -David W


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Booting an SCA app without creating an scdl file

2006-08-10 Thread Venkata Krishnan

Hi Jeremy,

(I will most certainly spend some effort looking up the code myself :-) but
just wanted to validate some thoughts)

Are there SCDL readers?  For example I imagine that there is a
scdl-file-reader that reads an scdl file and creates an scdl object model.

So the deployer starts by invoking a set of readers to create scdl models.
Then based on the content of the model appropriate loaders and builders are
called for fine-grained processing of the scdl.

If this was true then can we not have a specialized reader which will
dynamically create a scdl model and return it.  Then the usual flow of the
deployer calling the loaders, builders .. will happen.

Ofcourse I also imagine that we might have other flavours of 'loaders' that
should be able to act on say scdl structures as a java object like the ones
that process XMLStream.  Infact variants of loaders is also something I
remember being discussed.

So in what David is asking, can it just not be that, a reader is implemented
and registered with the deployer as we do for loaders and builders.  This
way the SCA framework continue to have control instead of we calling the
Builder or adding the built runtime artifact as child and so on.

If you have been able to stand this upto here... then thanks :-)

- Venkat



On 8/10/06, Jeremy Boynes [EMAIL PROTECTED] wrote:


Setting up a runtime or an application?

If it's just an application then you should be able to construct your
configuration by hand and pass it to the Builder to create the
runtime component then then add the built component as a child. One
way to do this might be to subclass DeployerImpl and stub out the load
() method.

--
Jeremy

On Aug 10, 2006, at 9:16 AM, David Wheeler wrote:

 I wasn't planning on defining a custom runtime, only setting up a
 runtime by
 passing the information currently contained in the defualt.scdl file
 directly to the loader, bypassing the file system.

 What I am trying to do is create all the classes and interfaces for
 the
 system in memory, and then pass those to the launcher in order to
 start the
 runtime.

 On 8/9/06, Jim Marino [EMAIL PROTECTED] wrote:

 Hi David,

 Yes, you should be able to do this, although you may need to create
 your own Bootstrapper implementation as opposed to
 DefaultBootstrapper. Depending on what you want to do, you can either
 create an in memory representation of the model, passing it to the
 Deployer system service or you can create one of the subclasses of
 SCAObject and pass it to CompositeComponent.register() if you want to
 avoid the model altogether and do something like PicoContainer
 (http://www.picocontainer.org/). If you opt for the latter you will
 be responsible for wiring.

 The above assumes you want to essentially create a custom runtime
 distribution. If your goal is to dynamically bind something from some
 type of instrumentation, then that would best be done through a
 management API that hasn't been defined but which people have talked
 about.

 The custom runtime option will likely not work from application code
 as the system classloaders are isolated.  Also, in Dependency
 Injection-based systems, I generally find dynamic binding to be an
 anti-pattern that is best avoided through configuration.

 Perhaps you could detail a little more what you are trying to do?
 Also, if you wanted to talk about a potential management API, I know
 several of us would be interested.

 Jim


 On Aug 9, 2006, at 2:49 PM, David Wheeler wrote:

  I'm trying to dynamically define a service based on an interface
  and I was
  wondering,
  Is there currently a way to pass the description of an SCA
 application
  directly rather than passing the information through the
 defualt.scdl?
 
  -David W


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Booting an SCA app without creating an scdl file

2006-08-09 Thread David Wheeler

I'm trying to dynamically define a service based on an interface and I was
wondering,
Is there currently a way to pass the description of an SCA application
directly rather than passing the information through the defualt.scdl?

-David W


Re: Booting an SCA app without creating an scdl file

2006-08-09 Thread Jim Marino

Hi David,

Yes, you should be able to do this, although you may need to create  
your own Bootstrapper implementation as opposed to  
DefaultBootstrapper. Depending on what you want to do, you can either  
create an in memory representation of the model, passing it to the  
Deployer system service or you can create one of the subclasses of  
SCAObject and pass it to CompositeComponent.register() if you want to  
avoid the model altogether and do something like PicoContainer  
(http://www.picocontainer.org/). If you opt for the latter you will  
be responsible for wiring.


The above assumes you want to essentially create a custom runtime  
distribution. If your goal is to dynamically bind something from some  
type of instrumentation, then that would best be done through a  
management API that hasn't been defined but which people have talked  
about.


The custom runtime option will likely not work from application code  
as the system classloaders are isolated.  Also, in Dependency  
Injection-based systems, I generally find dynamic binding to be an  
anti-pattern that is best avoided through configuration.


Perhaps you could detail a little more what you are trying to do?  
Also, if you wanted to talk about a potential management API, I know  
several of us would be interested.


Jim


On Aug 9, 2006, at 2:49 PM, David Wheeler wrote:

I'm trying to dynamically define a service based on an interface  
and I was

wondering,
Is there currently a way to pass the description of an SCA application
directly rather than passing the information through the defualt.scdl?

-David W



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]