You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by whcmachado <wh...@gmail.com> on 2017/10/20 13:32:23 UTC

Ignite Web Session Clustering

Hi there,

I'm trying to use Web Session Clustering. First, I got an example from the
topic
http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-td6596.html
where Vladislav PyatkovReply shared a Ignite-WebApp example
http://apache-ignite-users.70518.x6.nabble.com/attachment/6714/0/Ignite-WebApp.zip.

I did some changes to avoid some errors (I thought it happend by some
Ignite's version changes)  as follows:
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'memoryMode'...
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'memoryMode'...
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'swapEnabled'...

I also added a property on ignite-config.xml and set its value on web.xml as
follows:

<property name="gridName" value="myGridName"/>

<context-param>
	<param-name>IgniteWebSessionsGridName</param-name> Ignite-WebApp.zip
<http://apache-ignite-users.70518.x6.nabble.com/file/t1412/Ignite-WebApp.zip>  
	<param-value>myGridName</param-value>
</context-param>


I started 2 ignite nodes (apache-ignite-fabric-2.2.0) and a 3rd node that
was the Ignite-WebApp on apache-tomcat-8.5.15. I was able to access the
servlet on localhost (http://127.0.0.1:8080/Ignite-WebApp/gate) and after
each refresh a counter increased its value.

So, I stopped and restarted the tomcat and the counter kept its value and
after each refresh the counter continued to increase. Great!

Then, I just copied the same Ignite-WebApp.war to webapps folder (here a I
didn't stop the tomcat), waited for the 3rd Ignite node restart, hit the
servlet again, and that time the counter restarted its value.

Is this a use case that the Ignite supports or am I by some lack of
knowledge misunderstanding the Ignite's concepts?

Can anyone help me?

I really appreciate any help you can provide.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite Web Session Clustering

Posted by "slava.koptilin" <sl...@gmail.com>.
Hello!

> our main project uses Jboss Seam 2.2.1.CR1, JSF 1.2_15, Facelets 1.1.14,
> Richfaces 
> 3.3.3, Hibernate 3.3.2, c3p0 0.9.1.2, Spring 3.1.3 and Servlet 2.5 (maybe
> we 
> can update the Servlet version, but not the others). 
Apache ignite has been officially tested with the following servlet
containers:
Apache Tomcat 7
Eclipse Jetty 9
Apache Tomcat 6
Oracle WebLogic >= 10.3.4

> As we're not using the most recent versions of those frameworks and there 
> are something like Seam contexts, do you think that our application is 
> suitable for Ignite Web Session Clustering? 
I think your application can be used with Ignite.
Anyway, the best way to know - is to try :)

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite Web Session Clustering

Posted by whcmachado <wh...@gmail.com>.
Hello!

First, I'm sorry for my late reply.

I didn't close my web browser between those tests.

But as you talked about cookies, I looked at the cookies on chrome developer
tools and for some unknow reason I had a cookie for '/' and
'/Ignite-WebApp'. I cleaned those cookies and everything works well now.

Now we're going to try to set up Ignite on our main project which uses
frameworks like Jboss Seam 2.2.1.CR1, JSF 1.2_15, Facelets 1.1.14, Richfaces
3.3.3, Hibernate 3.3.2, c3p0 0.9.1.2, Spring 3.1.3 and Servlet 2.5 (maybe we
can update the Servlet version, but not the others).

As we're not using the most recent versions of those frameworks and there
are sommething like Seam contexts, do you think that our application is
suitable for Ignite Web Session Clustering?

Do you have any advice?

I really appreciate any help you can provide.

Thank you!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite Web Session Clustering

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

May it be so that you lost the session cookie during redeploy of war to
webapps folder?
For example, you could close browser session and start a new one.

This will lead to allocation of new session with counter at zero, while the
previous counter still exists but now inaccessible?

Can you check that you are actually using the same cookie before and after
webapp restart?


-- 
Ilya Kasnacheev

2017-10-20 16:32 GMT+03:00 whcmachado <wh...@gmail.com>:

> Hi there,
>
> I'm trying to use Web Session Clustering. First, I got an example from the
> topic
> http://apache-ignite-users.70518.x6.nabble.com/Error-
> when-trying-to-configure-web-session-clustering-td6596.html
> where Vladislav PyatkovReply shared a Ignite-WebApp example
> http://apache-ignite-users.70518.x6.nabble.com/attachment/6714/0/Ignite-
> WebApp.zip.
>
> I did some changes to avoid some errors (I thought it happend by some
> Ignite's version changes)  as follows:
> Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
> property 'memoryMode'...
> Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
> property 'memoryMode'...
> Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
> property 'swapEnabled'...
>
> I also added a property on ignite-config.xml and set its value on web.xml
> as
> follows:
>
> <property name="gridName" value="myGridName"/>
>
> <context-param>
>         <param-name>IgniteWebSessionsGridName</param-name>
> Ignite-WebApp.zip
> <http://apache-ignite-users.70518.x6.nabble.com/file/
> t1412/Ignite-WebApp.zip>
>         <param-value>myGridName</param-value>
> </context-param>
>
>
> I started 2 ignite nodes (apache-ignite-fabric-2.2.0) and a 3rd node that
> was the Ignite-WebApp on apache-tomcat-8.5.15. I was able to access the
> servlet on localhost (http://127.0.0.1:8080/Ignite-WebApp/gate) and after
> each refresh a counter increased its value.
>
> So, I stopped and restarted the tomcat and the counter kept its value and
> after each refresh the counter continued to increase. Great!
>
> Then, I just copied the same Ignite-WebApp.war to webapps folder (here a I
> didn't stop the tomcat), waited for the 3rd Ignite node restart, hit the
> servlet again, and that time the counter restarted its value.
>
> Is this a use case that the Ignite supports or am I by some lack of
> knowledge misunderstanding the Ignite's concepts?
>
> Can anyone help me?
>
> I really appreciate any help you can provide.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>