You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Rick <cr...@gmail.com> on 2006/09/26 22:57:20 UTC

Big Bank requiring session scope

Hello,
BB needs session scope, and I'm seeing following exception:
org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
factory not registered for scope [SESSION]
org.apache.tuscany.runtime.webapp.ServletLauncherInitException: 
org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
factory not registered for scope [SESSION]
    at 
org.apache.tuscany.runtime.webapp.WebappRuntimeImpl.initialize(WebappRuntimeImpl.java:171)
    at 
org.apache.tuscany.runtime.webapp.TuscanyContextListener.contextInitialized(TuscanyContextListener.java:75)
    at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)

It looks for sessison scope something needs to register the 
HttpSessionScopeObjectFactory with the ScopeRegistryImpl ?  But that 
needs to be only done in WebappRuntimeImpl and while I'm still looking 
at it don't see a clear path to add it just there so it does not affect 
the stand alone launcher. From what I can tell most components get this 
through autowire mechanism.
Any suggestions on this? 

Some other un related issues is the extension load order 
http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg08367.html
 I've temporarily worked around that by creating one scdl that includes 
the other extensions so I could control the loading order but that is 
not going to work in general.
 
I've really needed to move around jars and manually including scdl for 
extensions, and other jar dependencies to get everything to just load.


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


Re: Big Bank requiring session scope

Posted by Rick <cr...@gmail.com>.
I really think the session scope is a blocking issue. I've opened up TUSCANY-757 
  http://issues.apache.org/jira/browse/TUSCANY-757


Rick wrote:
> Hello,
> BB needs session scope, and I'm seeing following exception:
> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
> factory not registered for scope [SESSION]
> org.apache.tuscany.runtime.webapp.ServletLauncherInitException: 
> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
> factory not registered for scope [SESSION]
>    at 
> org.apache.tuscany.runtime.webapp.WebappRuntimeImpl.initialize(WebappRuntimeImpl.java:171) 
> 
>    at 
> org.apache.tuscany.runtime.webapp.TuscanyContextListener.contextInitialized(TuscanyContextListener.java:75) 
> 
>    at 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729) 
> 
> 
> It looks for sessison scope something needs to register the 
> HttpSessionScopeObjectFactory with the ScopeRegistryImpl ?  But that 
> needs to be only done in WebappRuntimeImpl and while I'm still looking 
> at it don't see a clear path to add it just there so it does not affect 
> the stand alone launcher. From what I can tell most components get this 
> through autowire mechanism.
> Any suggestions on this?
> Some other un related issues is the extension load order 
> http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg08367.html
> I've temporarily worked around that by creating one scdl that includes 
> the other extensions so I could control the loading order but that is 
> not going to work in general.
> 
> I've really needed to move around jars and manually including scdl for 
> extensions, and other jar dependencies to get everything to just load.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 
> 

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


Re: Big Bank requiring session scope

Posted by Jeremy Boynes <jb...@apache.org>.
On Sep 26, 2006, at 6:38 PM, Jim Marino wrote:

>> \
>>>> My understanding of the init levels is that it's scope of  
>>>> influence is for components in a composite.
>>>>
>>> Yes that's correct and if you have dependencies across modules,  
>>> it's not going to help. What we need is for the dependency thingy  
>>> Meeraj and Jeremy were working on to resolve out transitive  
>>> dependencies and load the extensions accordingly. I'm not sure  
>>> where that is at currently.
>>
>> Transitive dependencies are not going to address this - they are  
>> for the location of resources (e.g, classpath).
>>
>> One change may be to the way we do deployment. Currently for  
>> convenience when you deploy a component we also start it  
>> automatically. When we scan for extensions we deploy/start them as  
>> we find them.
>>
>> It is probably better if we modify the deploy API so that it does  
>> not automatically start the component. That way the scanner can  
>> deploy all the extensions first and then go back and start them  
>> all. That would mean that any inter-component references would  
>> resolve appropriately.
>>
> If the system services are in separate composites (as opposed to  
> included) I don't think that is going to solve it either since  
> system services aren't proxied so we can't lazy instantiate a  
> reference.

They're a hybrid - extensions are "included" in the system composite  
as components implemented by the extension's composite that are  
registered as its children. So the semantic is "include" although  
there is no specific <include> element.

> If one extension requires another extension, we need to figure out  
> the start order, which involves calculating transitive dependencies.

We should be clear when speaking of transitive dependencies about  
whether they are on resources (Artifacts) or components.

We do handle transitive references in the wire connection phase  
(don't we?)

> In this case we also need to deal with visibility of interfaces  
> across classloaders.

This should not be an issue here as the extensions are implementing  
services defined in terms of interfaces that come from the spi module  
which is in a parent classloader. I think that will be common.

> If they are included in one composite then I agree but I was under  
> the assumption that they were not being included. In any event, I  
> think we should revisit the deployment API, particularly if we want  
> to deploy multiple things as a "unit of work".

+1

> The first case is sounding a lot like OSGi ;-)

Dunno - remember this is about service dependencies not fancy  
classloading schemes :-)
--
Jeremy


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


Re: Big Bank requiring session scope

Posted by Jim Marino <jm...@myromatours.com>.
> \
>>> My understanding of the init levels is that it's scope of  
>>> influence is for components in a composite.
>>>
>> Yes that's correct and if you have dependencies across modules,  
>> it's not going to help. What we need is for the dependency thingy  
>> Meeraj and Jeremy were working on to resolve out transitive  
>> dependencies and load the extensions accordingly. I'm not sure  
>> where that is at currently.
>
> Transitive dependencies are not going to address this - they are  
> for the location of resources (e.g, classpath).
>
> One change may be to the way we do deployment. Currently for  
> convenience when you deploy a component we also start it  
> automatically. When we scan for extensions we deploy/start them as  
> we find them.
>
> It is probably better if we modify the deploy API so that it does  
> not automatically start the component. That way the scanner can  
> deploy all the extensions first and then go back and start them  
> all. That would mean that any inter-component references would  
> resolve appropriately.
>
If the system services are in separate composites (as opposed to  
included) I don't think that is going to solve it either since system  
services aren't proxied so we can't lazy instantiate a reference. If  
one extension requires another extension, we need to figure out the  
start order, which involves calculating transitive dependencies. In  
this case we also need to deal with visibility of interfaces across  
classloaders. If they are included in one composite then I agree but  
I was under the assumption that they were not being included. In any  
event, I think we should revisit the deployment API, particularly if  
we want to deploy multiple things as a "unit of work".

The first case is sounding a lot like OSGi ;-)

Jim


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


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


Re: Big Bank requiring session scope

Posted by Jeremy Boynes <jb...@apache.org>.
On Sep 26, 2006, at 2:39 PM, Jim Marino wrote:

>
> On Sep 26, 2006, at 2:24 PM, Rick wrote:
>
>> Thanks Jim for replying.  The WebAppRuntimeImpl is not a component  
>> implementation it boots up the sca runtime in a webaap  
>> environment. Seems like chick/egg situation.  Maybe I misunderstood.
> I'm not following how this is a chicken-and-egg situation. A system  
> SCDL needs to have a configuration entry for the session scope  
> object factory. This should work exactly like how the other scope  
> containers are registered.

That would be my guess - just add this to the webapp.scdl in the  
webapp-host module.

>> My understanding of the init levels is that it's scope of  
>> influence is for components in a composite.
>>
> Yes that's correct and if you have dependencies across modules,  
> it's not going to help. What we need is for the dependency thingy  
> Meeraj and Jeremy were working on to resolve out transitive  
> dependencies and load the extensions accordingly. I'm not sure  
> where that is at currently.

Transitive dependencies are not going to address this - they are for  
the location of resources (e.g, classpath).

One change may be to the way we do deployment. Currently for  
convenience when you deploy a component we also start it  
automatically. When we scan for extensions we deploy/start them as we  
find them.

It is probably better if we modify the deploy API so that it does not  
automatically start the component. That way the scanner can deploy  
all the extensions first and then go back and start them all. That  
would mean that any inter-component references would resolve  
appropriately.

--
Jeremy


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


Re: Big Bank requiring session scope

Posted by Jim Marino <jm...@myromatours.com>.
On Sep 26, 2006, at 2:24 PM, Rick wrote:

> Thanks Jim for replying.  The WebAppRuntimeImpl is not a component  
> implementation it boots up the sca runtime in a webaap environment.  
> Seems like chick/egg situation.  Maybe I misunderstood.
I'm not following how this is a chicken-and-egg situation. A system  
SCDL needs to have a configuration entry for the session scope object  
factory. This should work exactly like how the other scope containers  
are registered.

> My understanding of the init levels is that it's scope of influence  
> is for components in a composite.
>
Yes that's correct and if you have dependencies across modules, it's  
not going to help. What we need is for the dependency thingy Meeraj  
and Jeremy were working on to resolve out transitive dependencies and  
load the extensions accordingly. I'm not sure where that is at  
currently.


Jim

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


Re: Big Bank requiring session scope

Posted by Rick <cr...@gmail.com>.
Thanks Jim for replying.  The WebAppRuntimeImpl is not a component 
implementation it boots up the sca runtime in a webaap environment. Seems like 
chick/egg situation.  Maybe I misunderstood.
My understanding of the init levels is that it's scope of influence is for 
components in a composite.

Jim Marino wrote:
> 
> On Sep 26, 2006, at 1:57 PM, Rick wrote:
> 
>> Hello,
>> BB needs session scope, and I'm seeing following exception:
>> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
>> factory not registered for scope [SESSION]
>> org.apache.tuscany.runtime.webapp.ServletLauncherInitException: 
>> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope object 
>> factory not registered for scope [SESSION]
>>    at 
>> org.apache.tuscany.runtime.webapp.WebappRuntimeImpl.initialize(WebappRuntimeImpl.java:171) 
>>
>>    at 
>> org.apache.tuscany.runtime.webapp.TuscanyContextListener.contextInitialized(TuscanyContextListener.java:75) 
>>
>>    at 
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729) 
>>
>>
>> It looks for sessison scope something needs to register the 
>> HttpSessionScopeObjectFactory with the ScopeRegistryImpl ?  But that 
>> needs to be only done in WebappRuntimeImpl and while I'm still looking 
>> at it don't see a clear path to add it just there so it does not 
>> affect the stand alone launcher. From what I can tell most components 
>> get this through autowire mechanism.
>> Any suggestions on this?
> The object factory should just be configured in a system scdl, probably 
> one specific to the web app runtime. I haven't been following the 
> changes closely in that area for a couple of weeks. I assume there is at 
> least one configuration artifact specific to that environment and if 
> not, there probably should be.
> 
>> Some other un related issues is the extension load order 
>> http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg08367.html
>> I've temporarily worked around that by creating one scdl that includes 
>> the other extensions so I could control the loading order but that is 
>> not going to work in general.
> Jeremy a while back put start levels in @Init. Won't this work?
>> I've really needed to move around jars and manually including scdl for 
>> extensions, and other jar dependencies to get everything to just load.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 
> 

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


Re: Big Bank requiring session scope

Posted by Jim Marino <jm...@myromatours.com>.
On Sep 26, 2006, at 1:57 PM, Rick wrote:

> Hello,
> BB needs session scope, and I'm seeing following exception:
> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope  
> object factory not registered for scope [SESSION]
> org.apache.tuscany.runtime.webapp.ServletLauncherInitException:  
> org.apache.tuscany.spi.component.ScopeNotFoundException: Scope  
> object factory not registered for scope [SESSION]
>    at org.apache.tuscany.runtime.webapp.WebappRuntimeImpl.initialize 
> (WebappRuntimeImpl.java:171)
>    at  
> org.apache.tuscany.runtime.webapp.TuscanyContextListener.contextInitia 
> lized(TuscanyContextListener.java:75)
>    at org.apache.catalina.core.StandardContext.listenerStart 
> (StandardContext.java:3729)
>
> It looks for sessison scope something needs to register the  
> HttpSessionScopeObjectFactory with the ScopeRegistryImpl ?  But  
> that needs to be only done in WebappRuntimeImpl and while I'm still  
> looking at it don't see a clear path to add it just there so it  
> does not affect the stand alone launcher. From what I can tell most  
> components get this through autowire mechanism.
> Any suggestions on this?
The object factory should just be configured in a system scdl,  
probably one specific to the web app runtime. I haven't been  
following the changes closely in that area for a couple of weeks. I  
assume there is at least one configuration artifact specific to that  
environment and if not, there probably should be.

> Some other un related issues is the extension load order http:// 
> www.mail-archive.com/tuscany-dev%40ws.apache.org/msg08367.html
> I've temporarily worked around that by creating one scdl that  
> includes the other extensions so I could control the loading order  
> but that is not going to work in general.
Jeremy a while back put start levels in @Init. Won't this work?
> I've really needed to move around jars and manually including scdl  
> for extensions, and other jar dependencies to get everything to  
> just load.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


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