I think that them intent is for any composites under the
TUSCANY_SCACPP_SYSTEM_ROOT to be loaded so I think it may be an error
to specify a _PATH that includes or is a subdirectory of the
SYSTEM_ROOT. Maybe we could police this or change the loader to ignore
duplicates from the same location.??

On 10/07/07, Brady Johnson <[EMAIL PROTECTED]> wrote:

I created a JIRA for this issue:
   https://issues.apache.org/jira/browse/TUSCANY-1418

 Im trying to start the Tuscany SCA runtime so that it loads several
service directories at once. Im assuming that this
should be achieved by using the systemPath argument of the
SCARuntime::initializeSharedRuntime() method. Im also
assuming that the systemPath should be a ":" (colon) or ";" (semi-colon)
seperated list of directories, each of which is a
separate SCA service directory.

If my assumptions are correct, then what purpose does the systemRoot
paramater serve when systemPath is specified?
In the call to ModelLoader::load(), if systemPath is specified, then the
following call is made:
   ModelLoader::loadComposites(systemRoot + PATH_SEPARATOR +
systemPath);

So lets assume that systemRoot is "~/tuscany/services" and systemPath is
"~/tuscany/services/serviceA:~/tuscany/services/serviceB"
Then ModelLoader::loadComposites() will be called with this string:

"~/tuscany/services:~/tuscany/services/serviceA:~/tuscany/services/servi
ceB"
Since the Files() constructor in loadComposites has the subdirectories
parameter set to true, the directories will be traversed as follows:
1. everything under "~/tuscany/services" (including serviceA and
serviceB)
2. everything under "~/tuscany/services/serviceA"
3. everything under "~/tuscany/services/serviceB"

This is problematic since the services get loaded/parsed multiple times.


When systemPath is set, changing the call do loadComposites() to this:
   ModelLoader::loadComposites(systemPath);
Avoids the multiple loading of the services. There is still some sort of
error when loading multiple services when loadComposites() is
called this way. It appears that the systemComposite is being
overwritten somehow and ends up empty.

Before digging into the second problem further, I would like to make
sure that my previous assumptions are accurate. It may be that Im
not invoking the runtime correctly.

--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - [EMAIL PROTECTED]



--
Pete

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

Reply via email to