I think I figured out how to make this work, but I don't think it's the
intended usage.
If I set TUSCANY_SCACPP_SYSTEM_ROOT to:
"~/tuscany/services/serviceA:~/tuscany/services/serviceB"
And leave TUSCANY_SCACPP_SYSTEM_PATH blank, then I get all of the
services loaded. Its not loaded as intended though, since what it does
is populate the SCARuntime::system composite with the system composites
from serviceA and serviceB. Does that seem correct?
--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - [EMAIL PROTECTED]
-----Original Message-----
From: Brady Johnson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 10:17 AM
To: [email protected]
Subject: RE: [TuscanySCA CPP] problems trying to load services from
multiple directories at once
I have since updated the JIRA with a clarification of what I am trying
to do and have included it here in <JIRA update> tags.
<JIRA update>
Just to clarify one piece of information about this problem:
serviceA and serviceB are totally unrelated. The system composites are
located as follows:
~/tuscany/services/
|
+----->serviceA/serviceA.composite
|
+----->serviceB/serviceB.composite
</JIRA update>
Seems like the problem is that the SCARuntime was designed towards just
having one service loaded at a time. And what I am trying to do is to be
able to load several unrelated services.
--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - [EMAIL PROTECTED]
-----Original Message-----
From: Pete Robbins [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 9:42 AM
To: [email protected]
Subject: Re: [TuscanySCA CPP] problems trying to load services from
multiple directories at once
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/ser
> vi
> 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]
---------------------------------------------------------------------
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]