You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by local-underground <lo...@yahoo.com> on 2005/10/27 20:11:42 UTC

Cluster startContext() SimpleTcpCluster

Hello,

I am very curious why a Cluster does not make sure the context it is defined in is
actually started before listening?  This is proving to be a serious bug for me.  I am
implementing session replication where nested objects are defined via JNDI in my context.
 But when a new cluster member is added, it immediately receives a session and attempts
to deserialize the sessions before loading my context.. which is causing errors due to
classes not being found.

I see a startContext() defined in SimpleTcpCluser but it appears to be depracted and is
blank.  

I do realize I can make a global Resource and reference this JNDI within my context, but
I dont wanna move a huge chunk of my web application in global scope just to have these
references visible when the cluster starts.

Can some one explain the logic of why the Context is not loaded before the cluster
starts?  Can some one advise me on a quick fix to achieve this?


thanks in advance


chris
   




		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Re: Cluster startContext() SimpleTcpCluster

Posted by Peter Rossbach <pr...@objektpark.de>.
Hey,

manager is started after some other things are active.
s. Standardcontext.start() L.4079

WebApp Listener and Filters starts after manager. The 
NamingContextListener (JNDI)
starts before Manager is started.

Ok, what can we do?

Peter


local-underground schrieb:

>Peter,
>Thanks for response.  I did not implement my own replication, I only looked at the code
>to see if my Context was started before the Cluster performed replication.  Let me try
>and clarify by asking this question:
>
>Does the Context start (meaning my servlet is started) before the Delta manager syncs
>with other nodes?
>
>It appears the Context is not started before the Sessions are received.  If this is true,
>this is why I am having issues.  This is because when Sessions are received, they are
>deserialized before the web application is loaded.  Inside my sessions, I have factory
>objects loaded via JNDI.  These JNDI references are not found.  This only occurs when
>Clustering my sessions.
>
>I hope that makes sense.
>
> 
>
>
>--- Peter Rossbach <pr...@objektpark.de> wrote:
>
>  
>
>>Hey,
>>
>>a)   current tomcat 5.5.12 cluster implementation is a message 
>>infrastructure.
>>b)   The Context can used this message infrastructure to implement 
>>remote session replication
>>c)   When a Context start the DeltaManager sync with other nodes. That 
>>means that all
>>       sessions are transfered form an other node. All lost messages 
>>before are dropped and
>>       not really important.
>>d)   With tomcat 5.5.12 I implemented a message buffering for all 
>>messages that received, when ALL_SESSION are transfered
>>       This message are replayed after nodes is in sync.
>>
>>Why you implemented your own session replication?  It's very hard way :-)
>>
>>Regards
>>Peter
>>
>>local-underground schrieb:
>>
>>    
>>
>>>Hello,
>>>
>>>I am very curious why a Cluster does not make sure the context it is defined in is
>>>actually started before listening?  This is proving to be a serious bug for me.  I am
>>>implementing session replication where nested objects are defined via JNDI in my
>>>      
>>>
>>context.
>>    
>>
>>>But when a new cluster member is added, it immediately receives a session and
>>>      
>>>
>>attempts
>>    
>>
>>>to deserialize the sessions before loading my context.. which is causing errors due to
>>>classes not being found.
>>>
>>>I see a startContext() defined in SimpleTcpCluser but it appears to be depracted and
>>>      
>>>
>>is
>>    
>>
>>>blank.  
>>>
>>>I do realize I can make a global Resource and reference this JNDI within my context,
>>>      
>>>
>>but
>>    
>>
>>>I dont wanna move a huge chunk of my web application in global scope just to have
>>>      
>>>
>>these
>>    
>>
>>>references visible when the cluster starts.
>>>
>>>Can some one explain the logic of why the Context is not loaded before the cluster
>>>starts?  Can some one advise me on a quick fix to achieve this?
>>>
>>>
>>>thanks in advance
>>>
>>>
>>>chris
>>>  
>>>
>>>
>>>
>>>
>>>		
>>>__________________________________ 
>>>Yahoo! FareChase: Search multiple travel sites in one click.
>>>http://farechase.yahoo.com
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>> 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>
>		
>__________________________________ 
>Yahoo! FareChase: Search multiple travel sites in one click.
>http://farechase.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
>
>  
>



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


Re: Cluster startContext() SimpleTcpCluster

Posted by local-underground <lo...@yahoo.com>.
Peter,
Thanks for response.  I did not implement my own replication, I only looked at the code
to see if my Context was started before the Cluster performed replication.  Let me try
and clarify by asking this question:

Does the Context start (meaning my servlet is started) before the Delta manager syncs
with other nodes?

It appears the Context is not started before the Sessions are received.  If this is true,
this is why I am having issues.  This is because when Sessions are received, they are
deserialized before the web application is loaded.  Inside my sessions, I have factory
objects loaded via JNDI.  These JNDI references are not found.  This only occurs when
Clustering my sessions.

I hope that makes sense.

 


--- Peter Rossbach <pr...@objektpark.de> wrote:

> Hey,
> 
> a)   current tomcat 5.5.12 cluster implementation is a message 
> infrastructure.
> b)   The Context can used this message infrastructure to implement 
> remote session replication
> c)   When a Context start the DeltaManager sync with other nodes. That 
> means that all
>        sessions are transfered form an other node. All lost messages 
> before are dropped and
>        not really important.
> d)   With tomcat 5.5.12 I implemented a message buffering for all 
> messages that received, when ALL_SESSION are transfered
>        This message are replayed after nodes is in sync.
> 
> Why you implemented your own session replication?  It's very hard way :-)
> 
> Regards
> Peter
> 
> local-underground schrieb:
> 
> >Hello,
> >
> >I am very curious why a Cluster does not make sure the context it is defined in is
> >actually started before listening?  This is proving to be a serious bug for me.  I am
> >implementing session replication where nested objects are defined via JNDI in my
> context.
> > But when a new cluster member is added, it immediately receives a session and
> attempts
> >to deserialize the sessions before loading my context.. which is causing errors due to
> >classes not being found.
> >
> >I see a startContext() defined in SimpleTcpCluser but it appears to be depracted and
> is
> >blank.  
> >
> >I do realize I can make a global Resource and reference this JNDI within my context,
> but
> >I dont wanna move a huge chunk of my web application in global scope just to have
> these
> >references visible when the cluster starts.
> >
> >Can some one explain the logic of why the Context is not loaded before the cluster
> >starts?  Can some one advise me on a quick fix to achieve this?
> >
> >
> >thanks in advance
> >
> >
> >chris
> >   
> >
> >
> >
> >
> >		
> >__________________________________ 
> >Yahoo! FareChase: Search multiple travel sites in one click.
> >http://farechase.yahoo.com
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: dev-help@tomcat.apache.org
> >
> >
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Re: Cluster startContext() SimpleTcpCluster

Posted by Peter Rossbach <pr...@objektpark.de>.
Hey,

a)   current tomcat 5.5.12 cluster implementation is a message 
infrastructure.
b)   The Context can used this message infrastructure to implement 
remote session replication
c)   When a Context start the DeltaManager sync with other nodes. That 
means that all
       sessions are transfered form an other node. All lost messages 
before are dropped and
       not really important.
d)   With tomcat 5.5.12 I implemented a message buffering for all 
messages that received, when ALL_SESSION are transfered
       This message are replayed after nodes is in sync.

Why you implemented your own session replication?  It's very hard way :-)

Regards
Peter

local-underground schrieb:

>Hello,
>
>I am very curious why a Cluster does not make sure the context it is defined in is
>actually started before listening?  This is proving to be a serious bug for me.  I am
>implementing session replication where nested objects are defined via JNDI in my context.
> But when a new cluster member is added, it immediately receives a session and attempts
>to deserialize the sessions before loading my context.. which is causing errors due to
>classes not being found.
>
>I see a startContext() defined in SimpleTcpCluser but it appears to be depracted and is
>blank.  
>
>I do realize I can make a global Resource and reference this JNDI within my context, but
>I dont wanna move a huge chunk of my web application in global scope just to have these
>references visible when the cluster starts.
>
>Can some one explain the logic of why the Context is not loaded before the cluster
>starts?  Can some one advise me on a quick fix to achieve this?
>
>
>thanks in advance
>
>
>chris
>   
>
>
>
>
>		
>__________________________________ 
>Yahoo! FareChase: Search multiple travel sites in one click.
>http://farechase.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
>
>  
>


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