[
https://issues.apache.org/jira/browse/TUSCANY-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ant elder reopened TUSCANY-2409:
--------------------------------
Assignee: (was: Raymond Feng)
Re-opening as I'm having some trouble using the createSCANodeFromClassLoader
method. It doesn't seem to find the .composite unless its in the top-level
folder which is a bit restrictive and even once found it then can fail to find
the resources required to run the composite in the itests i'm writing.
The api calls which do seem to work ok are:
File compositeFile = new File(compositeURI);
File compositeFolder = compositeFile.getParentFile();
SCAContribution contribution = new
SCAContribution(compositeFolder.getName(), compositeFolder.toURL().toString());
SCANode2 node =
SCANode2Factory.newInstance().createSCANode(compositeFile.getName(),
contribution);
but thats a bit of a mouthfull. For now in trunk I'll add a createSCANode
method which does those lines while this jira is investigated.
I'd also quite like the created sca node to be in the started state so i don't
need to explicitly call start, and i don't think the user should have to cast
between SCANode and SCAClient to get at the getService and start/stop methods.
> Major consumability issues with new Node and Domain APIs
> --------------------------------------------------------
>
> Key: TUSCANY-2409
> URL: https://issues.apache.org/jira/browse/TUSCANY-2409
> Project: Tuscany
> Issue Type: Bug
> Affects Versions: Java-SCA-1.3
> Environment: All
> Reporter: Simon Nash
> Fix For: Java-SCA-1.3
>
>
> The recent change to remove the previous domain/node implementation has
> created severe usabliity issues for the callback-ws-client and
> callback-ws-server samples.
> 1. In callback-ws-client, MyClientImpl, the line
> SCANode node =
> SCANodeFactory.createNodeWithComposite("myapp.composite");
> was changed to
> SCANode2 node =
> SCANode2Factory.newInstance().createSCANode("target/classes/myapp.composite",
> new SCAContribution("test", "target/classes"));
> 2. In callback-ws-client, CallbackClientTestCase, the line
> node = SCANodeFactory.createNodeWithComposite("callbackws.composite");
> was changed to
> node =
> SCANode2Factory.newInstance().createSCANode("jar:file:../callback-ws-service/target/sample-callback-ws-service.jar!/callbackws.composite",
> new SCAContribution("server",
> "../callback-ws-service/target/sample-callback-ws-service.jar"));
> 3. In callback-ws-server, CallbackServer, the line
> SCANode node =
> SCANodeFactory.createNodeWithComposite("callbackws.composite");
> was changed to
> SCANode2 node =
> SCANode2Factory.newInstance().createSCANode("target/classes/callbackws.composite",
> new SCAContribution("test", "target/classes"));
> 4. In callback-ws-server, CallbackServerTestCase, the line
> node = SCANodeFactory.createNodeWithComposite("callbackws.composite");
> was changed to
> node =
> SCANode2Factory.newInstance().createSCANode("target/classes/callbackws.composite",
> new SCAContribution("test", "target/classes"));
> The complexity of these APIs, and the need to embed hard-wired paths and jar
> names, is unacceptable for a simple sample. This is "must fix" for the 1.3
> release.
> It would also be good to convert more samples from the previous host-embedded
> APIs to the new domain/node APIs, but this can't happen until the
> consumability problems are fixed.
> Ideally we would have a "convenience" API similar to the previous
> createNodeWithComposite() API. This API would call the other more complex
> APIs under the covers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.