Deciding how to launch samples is tricky. If we're trying to sort out which
is the easiest way to fire up the runtime, probably the tuscany maven plugin
and the shell have an advantage. However, I think we should take into
consideration the fact that probably the first step that users do with a
sample is to import it in their favorite IDE (me included) so they can look
at the code. In this situation, a class or a unit test that starts the
runtime is often more useful than leaving the IDE and launching the sample
with an external tool.


On Fri, Feb 4, 2011 at 12:57 PM, Simon Laws <simonsl...@googlemail.com>wrote:

> On Fri, Feb 4, 2011 at 10:36 AM, Florian MOGA <moga....@gmail.com> wrote:
> > Hi,
> > I've decided to open a separate thread for this discussion as this topic
> is
> > big enough. I've tried all the samples from 2.0-beta2 rc2 and here are my
> > findings:
> > - sample-scdl-include-contribution (fails to load contribution when using
> > mvn tuscany:run, is there another way to start the runtime for this
> sample?)
> > - sample-dosgi-calculator-operations (org.osgi.framework.BundleException:
> > The bundle could not be resolved.)
> > - sample-dosgi-dynamic-calculator-operations
> > (org.osgi.framework.BundleException: The bundle could not be resolved.)
> > - sample-implementation-bpel-contribution (fails to load contribution
> when
> > using mvn tuscany:run, is there another way to start the runtime for this
> > sample?)
> > - sample-implementation-bpel-webapp ("Cant find BPEL Process" at startup)
> > - sample-implementation-composite-helloworld-contribution
> > (java.lang.IllegalArgumentException: Contribution not found as file or
> > dependency: ..\helloworld\target\sample-helloworld.jar)
> > - sample-implementation-composite-helloworld-ws-contribution
> > (java.lang.IllegalArgumentException: Contribution not found as file or
> > dependency:
> ..\helloworld-recursive\target\sample-helloworld-recursive.jar)
> > - sample-implementation-java-calculator-async-contribution (Caused by:
> > org.xml.sax.SAXParseException; systemId: http://calculator/; lineNumber:
> 2;
> > columnNumber: 132; The value of the attribute
> > "prefix="xmlns",localpart="ns4",rawname="xmlns:ns4"" is invalid. Prefixed
> > namespace bindings may not be empty.)
> > - sample-implementation-script-calculator(Caused by:
> > java.lang.IllegalStateException: Provider factory not found for class:
> >
> org.apache.tuscany.sca.implementation.script.impl.ScriptImplementationImpl)
> > - sample-implementation-spring-helloworld-webapp (fails at startup)
> > - sample-implementation-web-helloworld-js-client-webapp (functionality
> > broken)
> > - sample-implementation-web-helloworld-jsf-webapp (functionality broken)
> > - sample-sca-client-calculator(Caused by:
> java.lang.IllegalStateException:
> > Provider factory not found for class:
> >
> org.apache.tuscany.sca.implementation.script.impl.ScriptImplementationImpl)
> > - sample-sca-client-helloworld (Caused by:
> java.lang.IllegalStateException:
> > Provider factory not found for class:
> >
> org.apache.tuscany.sca.implementation.script.impl.ScriptImplementationImpl)
> > - shell (scripts don't load successfully)
> > - maven-osgi-junit (exceptions in junit log)
> > - sample-store (tests pass but when using Launch.java ->
> > ClassNotFoundException)
> > - feed in sample-store-webapp returns 404
> > - eightball-webapp (when clicking Ask returns 500)
> > There are samples that don't have Java classes or unit tests as launchers
> so
> > I've started them using mvn tuscany:run. Let me know if those samples
> > should've been launched differently.
> > How should we approach all those issues? It might worth having the
> > discussion about the consistent way of running samples now and applying
> > changes along with fixing the samples. Same with documentation.
> > Florian
> >
>
> Hi Florian
>
> Thanks for kicking this off.
>
> I think we need to decide what, for each type of sample, is our
> default launch mechanism. There are numerous different mechanisms in
> samples/running-tuscany but we need to pick something that will be
> obvious and easy to use for the first time user.
>
> There are different types of samples we have included
>
>  jar/zip standalone contributions (in some cases more than one
> contribution has to be run)
> contributions that must be run and then accessed by an SCA or Tuscany
> client
> contributions wrapped in a war
> contribution bundles (that expect to be run in an OSGi environment)
>
> There are probably some I've missed.
>
> Typically we've provided maven and ant scripts in the past. However we
> now have the new shell stuff and mvn plugins that can do some of the
> work. I wouldn't advocate removing any of these options but, for each
> type of sample, we should pick a simple default approach that we can
> easily document.
>
> IMHO, having tried it, documenting multiple approaches for each sample
> is hard work and makes the sample doc look complicated.
>
> I'll have  a play with the options we have now to see which one I like
> in each situation. If others can do the same we can discuss.
>
> Simon
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Reply via email to