You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Seth White <se...@gmail.com> on 2006/09/01 02:57:54 UTC

Configuration question

Hi,

I'm writing my first Web application that uses Tuscany.  I built Tuscany
from the latest source.

In my web application I execute the following line of code to get access to
the SCA environment

CompositeContext moduleContext = CurrentCompositeContext.getContext();

Currently this is returning null for me.  What should I be doing to
configure the Web application so that an actual context is returned?

I have done the following in web.xml:


<listener>

<listener-class>org.apache.tuscany.runtime.webapp.TuscanyContextListener
</listener-class>

</listener>
Thanks

Seth

Re: Configuration question

Posted by Jeremy Boynes <jb...@apache.org>.
I think you need to add a servlet filter to find the context to the  
thread.
--
Jeremy

On Aug 31, 2006, at 5:57 PM, Seth White wrote:

> Hi,
>
> I'm writing my first Web application that uses Tuscany.  I built  
> Tuscany
> from the latest source.
>
> In my web application I execute the following line of code to get  
> access to
> the SCA environment
>
> CompositeContext moduleContext = CurrentCompositeContext.getContext();
>
> Currently this is returning null for me.  What should I be doing to
> configure the Web application so that an actual context is returned?
>
> I have done the following in web.xml:
>
>
> <listener>
>
> <listener- 
> class>org.apache.tuscany.runtime.webapp.TuscanyContextListener
> </listener-class>
>
> </listener>
> Thanks
>
> Seth


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org