Hi Phil, I'm right in the middle of updating the user guide doc on webapps, thanks for asking, your questions will help get me to finish, i'll try to get some more done tomorrow and would welcome your feedback.
For you immediate questions: There's 3 ways to define the composite(s) that get used, you can define deployabl composites in a META-INF/sca-contributions.xml file, you can put the .composite files in the META-INF/sca-deployables folder, or you can use a composite file named WEB-INF/web.composite. For JSPs you can use an SCA taglib or access the SCADomain directly. To use the taglib, declare it with: <%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> and then you can define references to services with the sca:reference tag, eg: <sca:reference name="CalculatorServiceComponent" type="calculator.CalculatorService" /> That treats the domain as one big "virtual" component with every service in the domain being available as a reference in the JSP To access the SCADomain object directly: <% SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); CalculatorService calculatorService = (CalculatorService)scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); %> Thats right about no need to pragmatically load the ScaDomain like you would in a unit test, the web.xml definitions of a ContextListener or ServletFilter will start it up automatically. The above is a little bit of a mismash of various Tuscany specific features and SCA specification defined features, the SCA JEE spec is still being developed and we're doing that is it comes along which is why there are currently several different ways of doing things. ...ant On Thu, Jan 15, 2009 at 3:32 PM, Sykes, Phil <phil.sy...@sungardhe.com>wrote: > I'm getting ready to try Tuscany in a webapp for the first time but I'm > not sure about everything that needs to be done. The user guide only talks > about configuring web.xml. However, the samples show some other > configuration such as the contribution.xml file. I assume that this needs > to be there as well, correct? Also, in looking at the calculator-webapp > sample it looks like all you need to do is add a reference to a component in > a jsp and it is then available to use. Is that correct? In other words, is > there no need to programatically load the ScaDomain like you would in a unit > test? > > > > Thanks, > > > > Phil > > > > Philip Sykes * Principal Java Developer, Banner Product Engineering * > SunGard Higher Education * 3 Country View Road, Malvern PA 19335 * Tel 610 > 578 5185 * phil.sy...@sungardhe.com <karen.n...@sungardhe.com> * > www.sungardhe.com > > >