Hello there, I have two elementary question about interaction patterns in SCA. In section 4.1 of “Tuscany SCA in Action”, it says:
<quote> Remote – The interacting components are running in two different Tuscany nodes, in the same or separate Java virtual machines (JVMs), and could be running on different physical computers. An SCA binding such as web services or JMS is required to allow the components to communicate. Data passed between remote components is passed by value. Local – The interacting components are running in the same node and JVM. The Tuscany runtime uses in-memory communication in this case. Data passed between local components is passed by reference. </quote> First question with regard to remote interaction: I work with JDK 1.6 on Windows XP. Any time I start a node through any of the APIs (NodeLauncher, SCANodeFactory or SCADomain) I see a new Java process (JVM) started up. Also, when I want to start a remote node in a distributed domain I will use java.exe on the command-line. So there seems to be a one-to-one correspondence between nodes and JVMs, contrary to the assumption in the above quote. Or is there an API that will simply start a new thread and use a separate classloader to create a new node, or something? Or is this operating system dependent? If so, in what system, and how, could I set up two separate nodes running in the same JVM and interacting remotely? Follow-up question with regard to local interactions: If two components communicate through local interfaces only, is there anything from a design point of view against passing normal Java references as method parameters, e. g. "addListener(this)" as opposed to "addListener(componentContext.createSelfReference(myLocalInterface.class))" ? -- Sebastian
