You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Vytautas R." <tu...@gmail.com> on 2011/08/02 16:29:54 UTC
Wicket 1.5 and glassfish 3.1.1 clustering (session replication)
Hello,
Environment: Windows platform, Glassfish 3.1.1, Apache Wicket 1.5-RC5.1
(quickstart from wicket.apache.org)
Created to nodes, deployed very simple web application.
HttpServletRequest request = (HttpServletRequest) ((WebRequest)
RequestCycle.get().getRequest()).getContainerRequest();
HttpSession session = request.getSession();
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy
hh:mm:ss.SSS");
String serverInstance =
System.getProperty("com.sun.aas.instanceName");
String sessionId = session.getId();
String creationDate = formatter.format(session.getCreationTime());
String lastAccessTime =
formatter.format(session.getLastAccessedTime());
if (session.isNew()) {
session.setAttribute("Test", "value");
}
String attribute = (String)session.getAttribute("Test");
add(new Label("sessionId", sessionId));
add(new Label("creationDate", creationDate));
add(new Label("lastAccessTime", lastAccessTime));
add(new Label("attribute", attribute));
add(new Label("serverInstance", serverInstance));
Session is not replicated and new one is created when switching from one
cluster to another.
However: The same Windows platform, Glassfish 3.1.1, Apache Wicket 1.4.17
(quickstart from wicket.apache.org) - everything seems to be working fine
(session is replicated).
just small change to get servlet request: HttpServletRequest request =
(HttpServletRequest) ((WebRequest)
RequestCycle.get().getRequest()).getHttpServletRequest();
Anybody has an idea what might be wrong?
--
Best regards,
Vytautas R.
-----------------------------------
www.xaloon.org
www.allcarindex.com
Re: Wicket 1.5 and glassfish 3.1.1 clustering (session replication)
Posted by Igor Vaynberg <ig...@gmail.com>.
looks like a glassfish bug.
-igor
On Tue, Aug 2, 2011 at 7:29 AM, Vytautas R. <tu...@gmail.com> wrote:
> Hello,
> Environment: Windows platform, Glassfish 3.1.1, Apache Wicket 1.5-RC5.1
> (quickstart from wicket.apache.org)
> Created to nodes, deployed very simple web application.
>
> HttpServletRequest request = (HttpServletRequest) ((WebRequest)
> RequestCycle.get().getRequest()).getContainerRequest();
> HttpSession session = request.getSession();
>
> DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy
> hh:mm:ss.SSS");
>
> String serverInstance =
> System.getProperty("com.sun.aas.instanceName");
> String sessionId = session.getId();
> String creationDate = formatter.format(session.getCreationTime());
> String lastAccessTime =
> formatter.format(session.getLastAccessedTime());
> if (session.isNew()) {
> session.setAttribute("Test", "value");
> }
> String attribute = (String)session.getAttribute("Test");
>
> add(new Label("sessionId", sessionId));
> add(new Label("creationDate", creationDate));
> add(new Label("lastAccessTime", lastAccessTime));
> add(new Label("attribute", attribute));
>
> add(new Label("serverInstance", serverInstance));
>
> Session is not replicated and new one is created when switching from one
> cluster to another.
> However: The same Windows platform, Glassfish 3.1.1, Apache Wicket 1.4.17
> (quickstart from wicket.apache.org) - everything seems to be working fine
> (session is replicated).
> just small change to get servlet request: HttpServletRequest request =
> (HttpServletRequest) ((WebRequest)
> RequestCycle.get().getRequest()).getHttpServletRequest();
>
> Anybody has an idea what might be wrong?
>
>
> --
> Best regards,
> Vytautas R.
> -----------------------------------
> www.xaloon.org
> www.allcarindex.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org