On Wed, Jul 27, 2011 at 5:13 PM, Subash Chaturanga <subash...@gmail.com> wrote: > Hi devs, > I am a tuscany user in Apache PhotArk and I have an unexpected issue with my > two services and I tried to resolve this many times, but couldn't figure out > a way. > I have implemented two working tuscany SCA components > named, FacebookFriendFinder and FaceRecognitionService. > > I use the service FaceRecognitionService inside the > service FacebookFriendFinder. > Following is a kind of a pseudo code code to explain my situation. > In FacebookFriendFinder Impl class > > Photo processFBFriends() { > ... > ... > Photo p = FaceRecognitionService.recognize("file"); // call the recognize > method in the service, FaceRecognitionService. > --- program does not return to this line, it terminates > } > > In FaceRecognitionService impl class > public Photo recognize(String s) { > ... > ... > Photo p = someAPI.recognize(); > // system.out(p) -- When I do a system.print to the Photo p before the > return statement, it prints the expected "p". > return p; > } > I am confused with this. Though "p" prints and is available just before the > return statement in the class FaceRecognitionService it doesn't pass to its > parent method any how. When I changed the return types to String from Photo, > it works fine and return the string. > So is there a problem in interacting among two tuscany SCA service > components when dealing with custom objects like (org.face4j.Photo) other > than java native ones ? > It will be great if I can get some idea to resolve this issue. > > Thanks > -- > Subash Chaturanga > Department of Computer Science & Engineering > University of Moratuwa > Sri Lanka > Blog - http://subashsdm.blogspot.com/ > Twitter - http://twitter.com/subash89 > >
Hi Subash Is FacebookFriendFinder communicating with FaceRecognitionService via an SCA reference? From you psuedo code it looks like a static call? If there is an SCA wire between the two the precise behaviour will depend on the service interfaces the binding involved and any intents/annotations that may have been added so we'd need to see more detail of the composite you have. Regards Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com