struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: <distributable />
Date Tue, 10 Oct 2000 22:10:10 GMT
Colin Sampaleanu wrote:

> Actually, I think it should be... I just did a run through, and the Locale
> object is the only thing Struts itself seems to need to store in the
> Session, and that is Serializable. Just make sure the scope of all your
> objects is set to Request (this does of course potentially change your
> logic, you may have to pass around data a lot more for multi-pae forms).
> The sample app may also have dependencies on sticking objects in the Session
> object that are not serializable; I didn't really check that...
>

As Colin points out, the key requirement for a distributable app is that the
beans you store in the session (for example, all of your ActionForm beans) must
implement Serializable.  This is not currently the case for the Struts example
app, but can be easily made so by simply adding "implements Serializable" to all
of the appropriate classes.  I will do this for 1.0.

Craig


>
> > -----Original Message-----
> > From: Klaus Thiele [mailto:kth@pi-ag.com]
> > Sent: October 10, 2000 1:43 PM
> > To: struts-dev@jakarta.apache.org
> > Subject: <distributable />
> >
> >
> > Hello,
> >
> > is there any chance to make a struts-application "distributable"?
> >    <web-app>
> >      <distributable />
> >      [...]
> >
> > i'm currently testing Orion's loadbalancing with my struts-app and
> > it fails with:
> > ---snipp-------------------------------------------------------------
> > java.lang.IllegalArgumentException: Only java.io.Serializable,
> >   javax.ejb.EJBObject and javax.ejb.EJBHome instances can be bound
> >   to a session in a distributable web-application
> >         at
> > com.evermind.server.http.ClusteredHttpSession.setAttribute(JAX)
> >         at com.evermind.server.http.EvermindHttpSession.putValue(JAX)
> >         at
> > com.evermind.server.http.EvermindPageContext.setAttribute(JAX)
> >      -> at
> > org.apache.struts.taglib.FormTag.doStartTag(FormTag.java:510)
> > <-
> >         [...]
> > ---snipp-------------------------------------------------------------
> >
> > thanks a lot
> >   klaus
> >
> > --
> > Klaus Thiele - Personal & Informatik AG
> > mailto:kth@pi-ag.com
> >
> >  "There's got to be more to life than compile-and-go."
> >

--
====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Mime
View raw message