struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@apache.org>
Subject Re: FW: WebLogic serializing ServletContext
Date Tue, 27 Dec 2005 19:40:09 GMT
On 12/27/05, George.Dinwiddie@wellsfargo.com <
George.Dinwiddie@wellsfargo.com> wrote:
>
> I am very reluctant to file this as a bug in bugzilla (or reopen 28868),
> as it's hard for me to believe that this is really a Struts issue rather
> than a WebLogic issue.  Bea support, of course, thinks otherwise.
>
> Can anyone tell me whether or not it is legitimate to serialize the
> ServletContext?


The J2EE specs require that applications make *session* attributes
seriaizable for distributable applications, but are silent about
*ServletContext* (i.e. application scope) attributes.  It is certainly
possible (although unwise, IMHO) for an application server vendor to impose
this as an additional restriction -- but that's not anything coming from the
specs.  Therefore, frameworks like Struts do not make any effort to ensure
that their application scope attributes are indeed Seriaizable.

Craig


-----Original Message-----
> From: Dinwiddie, George
> Sent: Thursday, December 22, 2005 11:22 AM
> To: user@struts.apache.org
> Subject: WebLogic serializing ServletContext
>
>
> Is anyone successfully using Struts on a WebLogic Managed Server?
>
> We are seeing errors like this:
>
> <Oct 26, 2005 10:20:31 PM MST> <Error> <HTTP> <BEA-101309>
>         <[ServletContext(id=18877050,name=servicerlink,context-path=)]
>         could not deserialize the context attribute
>         "org.apache.struts.action.PLUG_INS"
> java.io.NotSerializableException:
> org.apache.struts.validator.ValidatorPlugIn
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
>
> and
>
> <Nov 2, 2005 12:26:55 PM MST> <Error> <HTTP> <BEA-101309>
>         <[ServletContext(id=3031962,name=direct,context-path=/direct)]
>         could not deserialize the context attribute
>         "org.apache.struts.tiles.DEFINITIONS_FACTORY"
> java.io.NotSerializableException:
> com.wellsfargo.link.view.controllers.IndexController
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
>
> We started down the path of wrapping objects in wrapper classes that
> implement Serializable, but that seemed like a never-ending quest.  This
> looks like exactly the same problem as that described in
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28868.  It appears to
> be somewhat different from bug 26322, and I don't think bug 28868 is
> really a duplicate of 26322.
>
> I do not know why BEA is serializing the ServletContext, and my reading
> of the Servlet 2.2 and 2.3 specs gives me doubt that they should be
> doing so.  Perhaps it's due to a misconfiguration on our part.  It
> occurs to me, however, that there must be others successfully using
> Struts on WebLogic.  If so, I'd like to hear from you.
>
> - George
>
> --
> George Dinwiddie
> 410-884-6473
> george.dinwiddie@wellsfargo.com
> gdinwiddie@idiacomputing.com
>
> "There are two ways of constructing a software design: One way is to
> make it so simple that there are obviously no deficiencies, and the
> other way is to make it so complicated that there are no obvious
> deficiencies."  -- C. A. R. Hoare
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message