I'll reply to separate points in separate emails to try to keep the
discussion clear:

On Fri, Jan 29, 2010 at 9:43 PM, Raymond Feng <[email protected]> wrote:
> Hi,
>
> I would like summarize our story for Domain/Node so that we can be on the
> same page moving forward.
>
> A) The key players and steps:
>
> 1) The JVM is started
>
> 2) Tuscany runtime classes are loaded by the JVM into the one or more class
> spaces (within a class space, there is at most one class for a given class
> name):
> * One class space per JVM (such as Tomcat deep integration or standalone
> Tuscany launcher)
> * Multiple class spaces (such as Web applications that package the Tuscany
> jars)
>
> 3) Tuscany runtime is bootstrapped and NodeFactory can be instantiated to
> encapsulate the ExtensionPointRegistry which manages all the extension
> points and extensions in Tuscany.
> * In most cases, NodeFactory.getInstance() returns the shared NodeFactory
> * You can also call NodeFactory.newInstance() to creates a new instance
>

We should try to understand the uses of newInstance/getInstance as its
confusing with both and very easy to not notice which is used or
realize the difference with which ever you happen to. It would be much
simpler if we could just have one of those. Do we really need to have
a shared NodeFactory and the getInstance method? All the uses I can
see of them could be changed to work with just
NodeFactory.newInstance() and then manage sharing of that instance
themselves. This is also going to get more complicated if we start
passing in things like the registry configuration  - what happens when
getInstance is used but with different configurations? Or changes to
the environment cause unexpected changes in the app, eg Tuscany is
packaged in a webapp and getInstance is used but then Tuscany is moved
to a shared library used by several webapps.

   ...ant

Reply via email to