The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

m.dr (70) [Avatar] Offline
#1
Going through the SCA In Action and it has been really good to understand the SCA framework. Appreciate the details put into it. The understanding in the implementation with sca-contribution.xml file and the contribution file was very helpful.

A question I had was in creating a webapp. While I understand how the sca-contribution imports / exports other projects so things can be kept separate I did not see a sca-contribution.xml file in a webapp. I created all my contributions using the mvn artifact generate.

So my question is when I am developing a webapp and keep all other SCA components separate - what would be the best way to structure the webapp. If the webapp just has servlets and jsps - how can I make them aware of other components / services that are in the SCA framework.

I am not understanding if the webapp composite should have references / bindings or just using the other classes as dependencies from maven.

If there was a more comprehensive webapp example that could show for example how the fullapp can be leveraged from a webapp - would be great. It would be great to see how to keep the webapp as separate as possible so that the webapp could be changed to use different technologies w/o touching the fullapp.

Also I checked out the code from svn and don't see the contributions/usingsca - then I saw the note about contributions/using but I don't see that either.

Is that a different directory now.

Thanks.
simon.nash (37) [Avatar] Offline
#2
Re: webapp configuration
I'm not sure which URL you used to check out the travel sample code. The correct place to get this is from the page http://tuscany.apache.org/sca-java-travel-sample-1x-releases.html, which has links to download the 1.0 release of the travel sample. If you download this version, it includes the contributions/usingsca directory.

In the Tuscany sample webapps, we include all the SCA components within the webapp. In Tuscany 1.x I don't think there's any other option. In Tuscany 2.x you should be able to use the SCA client API from within a webapp servlet to invoke SCA services running in some other SCA domain.