You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by José Manuel Molina Pascual <ra...@gmail.com> on 2008/01/14 14:48:03 UTC

Replication problem

Hello.

I'm using Tomcat 5.5.23.

I'm having an extrange problem in some cases.

One of the attributes I have to replicate is having this issue.

The first time it is replicated it goes ok to the other tomcat instance.

The following times it has to be replicated it is received at the
other instance "outdated", that is, the second time (second user
request) it's replicated the same value as in the first time is
received, the third time the second value is received and so on.

I don't even know from where it could be getting the old value, I have
debugged (I even have a breakpoint in the attributeChanged /
attributeAdded methods to watch what is "exiting" the original
instance  and it seems to be ok.

Then, at the other instance the old value is received.

Has anyone suffered this issue?

Thanks in advance.

-- 
The complexity of software is an essential property, not an accidental one.

Learn as if you were going to live forever. Live as if you were going
to die tomorrow.

In politics stupidity is not a handicap.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Replication problem

Posted by José Manuel Molina Pascual <ra...@gmail.com>.
Hello again, I solved, the issue.

Definitevely it's not a coding fault.

Let me explain a bit longer what we do.

The customer asked us to support a domain cookie, we had also other
http-headers session retrieval mechanisms requested by the customer.

So we have a session manager (not a subclass or instance of Tomcat's
DeltaManager) that gives us the appropiate session:

It tries the following:
1.- session bound to header x
2.- session with domain cookie session id
3.- as usual



And this is how I have solved the Issue:
If step 2 is fulfilled, I also ask tomcat for a session
(httpRequest.getSession()) and compare its ID with the common domain
session ID, if it's not the same and  the session is not new I
invalidate it and ask Tomcat for a new Session.


So, I don't know how but Tomcat was replicating a past session ( I
have not changed anything more in the code).




On Jan 14, 2008 2:48 PM, José Manuel Molina Pascual
<ra...@gmail.com> wrote:
> Hello.
>
> I'm using Tomcat 5.5.23.
>
> I'm having an extrange problem in some cases.
>
> One of the attributes I have to replicate is having this issue.
>
> The first time it is replicated it goes ok to the other tomcat instance.
>
> The following times it has to be replicated it is received at the
> other instance "outdated", that is, the second time (second user
> request) it's replicated the same value as in the first time is
> received, the third time the second value is received and so on.
>
> I don't even know from where it could be getting the old value, I have
> debugged (I even have a breakpoint in the attributeChanged /
> attributeAdded methods to watch what is "exiting" the original
> instance  and it seems to be ok.
>
> Then, at the other instance the old value is received.
>
> Has anyone suffered this issue?
>
> Thanks in advance.
>
> --
> The complexity of software is an essential property, not an accidental one.
>
> Learn as if you were going to live forever. Live as if you were going
> to die tomorrow.
>
> In politics stupidity is not a handicap.
>



-- 
The complexity of software is an essential property, not an accidental one.

Learn as if you were going to live forever. Live as if you were going
to die tomorrow.

In politics stupidity is not a handicap.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org