You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcos Chicote <mc...@newtechnologies.com.ar> on 2007/03/28 21:17:01 UTC

Clustering Tapestry

Hello.
I've developed an app using tapestry4 + spring + hibernate and I can't make work in a clustered enviroment using 2 tomcat instances.
The problem is that the StaleSession page appears really fast.
All my objects and classes implement Serializable, but I don't know if tapestry is storing in session stuff that isn't Serializable.

Does anybode have any experience clustering a tapestry app??

Thanks
Marcos



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Clustering Tapestry

Posted by Marcos Chicote <mc...@newtechnologies.com.ar>.
Ups!
My bad.
Forgot about distributable tag in web.xml

Thanks Renat Zubairov and Steve Shucker anyway!

----- Original Message ----- 
From: "Renat Zubairov" <re...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Wednesday, March 28, 2007 6:02 PM
Subject: Re: Clustering Tapestry


> Hi
>
> We are clustering Tapestry 4 application on th e WebSphere cluster. It
> works quite well so far. No problems were reported.
> What do you mean by StaleSession appears fast?
>
> Renat
>
> On 28/03/07, Marcos Chicote <mc...@newtechnologies.com.ar> wrote:
> > Hello.
> > I've developed an app using tapestry4 + spring + hibernate and I can't
make work in a clustered enviroment using 2 tomcat instances.
> > The problem is that the StaleSession page appears really fast.
> > All my objects and classes implement Serializable, but I don't know if
tapestry is storing in session stuff that isn't Serializable.
> >
> > Does anybode have any experience clustering a tapestry app??
> >
> > Thanks
> > Marcos
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> -- 
> Best regards,
> Renat Zubairov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Clustering Tapestry

Posted by Renat Zubairov <re...@gmail.com>.
Hi

We are clustering Tapestry 4 application on th e WebSphere cluster. It
works quite well so far. No problems were reported.
What do you mean by StaleSession appears fast?

Renat

On 28/03/07, Marcos Chicote <mc...@newtechnologies.com.ar> wrote:
> Hello.
> I've developed an app using tapestry4 + spring + hibernate and I can't make work in a clustered enviroment using 2 tomcat instances.
> The problem is that the StaleSession page appears really fast.
> All my objects and classes implement Serializable, but I don't know if tapestry is storing in session stuff that isn't Serializable.
>
> Does anybode have any experience clustering a tapestry app??
>
> Thanks
> Marcos
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,
Renat Zubairov

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Clustering Tapestry

Posted by Steve Shucker <ss...@vmsinfo.com>.
This may be the answer to the wrong question, but a long time ago I 
discovered that when weblogic was running out of memory, it would dump 
random sessions.  The solution was to configure the application server 
to persist sessions in the database.  This also allowed sessions to fail 
over to the other instance.  We carried this solution forward when we 
migrated to tomcat.  Here's a context.xml that turns this on.

<Context antiJARLocking="true" antiResourceLocking="true" path="/">       
<Manager className="org.apache.catalina.session.PersistentManager" 
debug="0" saveOnRestart="true" maxActiveSessions="-1" minIdleSwap="-1" 
maxIdleSwap="-1" maxIdleBackup="-1">
 <Store className="org.apache.catalina.session.JDBCStore" 
driverName="oracle.jdbc.OracleDriver"
                 connectionURL="${session.store.url}"
                  sessionTable="tomcat_sessions"
                  sessionIdCol="SESSION_ID"
                  sessionDataCol="session_data"
                  sessionValidCol="valid_session"
                  sessionMaxInactiveCol="max_inactive"
                  sessionLastAccessedCol="last_access"
                  sessionAppCol="app_name"
                  checkInterval="60"
                  debug="99" />
 </Manager>
</Context>

${session.store.url} corresponds to a "-Dsession.store.url=xxx" in my 
setenv.sh file, but you could just as easily hardcode it here.  I like 
parameterizing it so my dev/test tomcat instances can point to different 
stores.

Here's the schema:

create table tomcat_sessions (
    session_id     varchar2(100) not null,
    valid_session  char(1) not null,
    max_inactive   number(20) not null,
    last_access    number(20) not null,
    app_name       varchar2(255),
    session_data   blob,
    constraint pk_tomcat_sessions primary key (session_id, app_name)
);

For oracle, I dropped ojdbc14.jar in tomcat's common/lib folder.  Due to 
a bug (which may be fixed), I had to include the username/password as 
part of the connection URL rather than as separate attributes.

-Steve

Marcos Chicote wrote:
> Hello.
> I've developed an app using tapestry4 + spring + hibernate and I can't make work in a clustered enviroment using 2 tomcat instances.
> The problem is that the StaleSession page appears really fast.
> All my objects and classes implement Serializable, but I don't know if tapestry is storing in session stuff that isn't Serializable.
>
> Does anybode have any experience clustering a tapestry app??
>
> Thanks
> Marcos
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org