Hi, Doug.
At this point, we scan (and load) all the composite files in the SCA
contribution as composites can be referenced by QName. There are a few
things we can try to optimize:
1) Make the load lazy: we will only index the composite files by reading the
QName of the composite during the scan. Starting from a deployable composite
(can be defined in META-INF/sca-contributions.xml), when a composite is
referenced, we can fully load the model from XML during the resolving phase
of the referencing artifact. (We have already taken this approach for
WSDL/XSDs).
2) Make the load more error-tolerating: we could log errors/warnings and
continue.
Thanks,
Raymond
--------------------------------------------------
From: "Doug Tidwell" <[EMAIL PROTECTED]>
Sent: Wednesday, June 18, 2008 6:17 AM
To: <[email protected]>
Subject: Fw: Reworking the calculator samples
Resending to the updated address, apologies if yesterday's message
eventually shows up here as well....
----- Forwarded by Doug Tidwell/Raleigh/IBM on 06/18/2008 09:14 AM -----
From:
Doug Tidwell/Raleigh/IBM
To:
[EMAIL PROTECTED]
Date:
06/17/2008 12:23 PM
Subject:
Reworking the calculator samples
Gang, I've written a graphical front-end to the calculator samples.
There's a Swing front-end with the usual calculator buttons, and I've
added a menu that lets you select the .composite file you want to use. I'm
using this in a hands-on lab to emphasize that you can change the
infrastructure beneath an application without changing the application. To
build this, I've taken the code from the existing calculator demos and
integrated them into a single Eclipse project. I'm currently working on
deploying the calculator as a Web service.
What surprised me is that whenever I run the application, I get an error
if there's anything wrong with any .composite file in the Eclipse project.
My assumption was that Tuscany wouldn't load a .composite file unless I
created an SCADomain with it. As it is, Tuscany loads every .composite
file it can find, then complains if something's wrong with one of them,
whether I use that .composite file or not. Is this an implementation
decision, or did I miss something in the spec that says an SCA runtime
should work this way?
I'd appreciate any insight on this. I'm working around the problem easily
enough, but the behavior surprised me. I'm using tuscany-1.1-incubating,
fwiw.
...And yes, I'll post all the materials for the hands-on workshop soon, I
promise.