I have some code around the r603995 level... and I noticed the following
transformer chain when the impl uses JAXB with the WS binding (using AXIOM
DB):
org.apache.tuscany.sca.databinding.jaxb.JAXB2Node
org.apache.tuscany.sca.databinding.sdo.Node2DataObject
org.apache.tuscany.sca.databinding.sdo.DataObject2XMLStreamReader
org.apache.tuscany.sca.databinding.axiom.XMLStreamReader2OMElement
This let me to try to mark the DataObject2XMLStreamReader transformer as
private in order to get it out of the picture. However, I'm wondering
if this code has a bug.
Though as I understand it, the idea behind marking a transformer as
'private' is to only allow it to be used during the first outbound
transform, it appears the code doesn't match up
with this.
In org.apache.tuscany.sca.databinding.impl.DirectedGraph we do:
public Path getShortestPath(V sourceValue, V targetValue) {
....
while (!otherNodes.isEmpty()) {
nextNode = extractMin(otherNodes);
if (nextNode.vertex == target) {
path = getPath(nextNode);
paths.put(pair, path); // Cache it
return path;
}
nodesOnPath.add(nextNode);
for (Edge edge : nextNode.vertex.outEdges.values()) {
Node adjacentNode = nodes.get(edge.targetVertex);
// Only look for public edge
if (edge.isPublic()) {
if (nextNode.distance + edge.weight <
adjacentNode.distance) {
adjacentNode.distance = nextNode.distance +
edge.weight;
adjacentNode.previous = nextNode;
}
}
}
}
So, the first time through this while loop, the 'nextNode' will simply be
the original source node. We immediately disallow private transformers,
then, via the isPublic() check in this logic, even in the first
outbound transform.
Am I understanding this correctly?
Scott