You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthew Heaton <Ma...@apexlearning.com> on 2001/01/10 22:17:12 UTC

RE: 1.0 status of MessageBundle and non-serializable application resources

I tried to get the latest version of struts to run in Weblogic just a day
ago and ran into non-serializable errors.  I made modifications that had
been suggested in a previous post and everything worked fine, but it doesn't
look like some of changes made it into the build.  The changes I made were,
 
Making MessageResourceFactory serializable as well as modifying the
setDefaultWriter method so it was always set to null.
 
Making sure the following classes were serializable (some were, some
weren't)
 
Action
ActionFormBean
ActionFormBeans
ActionForward
ActionForwards
ActionMapping
ActionMappings
ActionServlet
 
-Matt

-----Original Message-----
From: Ludwig, Pat [mailto:pludwig@silverstream.com]
Sent: Wednesday, January 10, 2001 1:06 PM
To: Struts-User (E-mail)
Subject: 1.0 status of MessageBundle and non-serializable application
resources


hi Craig,
    would you please give a quick report on the status in Struts 1.0 of the
proposed change of MessageResources to MessageBundle and conversion of other
non-serializable application resources. you had proposed a solution for
MessageResources in early December, and i know that a number of changes have
been made to 1.0 to rectify other non-serializable problems. still there
have been sporadic reports of serialization exceptions with various
appservers. will all the changes you proposed be implemented in the 1.0 code
base? this is really quite an important development issue since it affects a
container's ability to re-deploy an application without restarting.
 
thanks,
Pat Ludwig
 
 


Re: 1.0 status of MessageBundle and non-serializable application resources

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Matthew Heaton wrote:

>  I tried to get the latest version of struts to run in Weblogic just a day ago
> and ran into non-serializable errors.  I made modifications that had been
> suggested in a previous post and everything worked fine, but it doesn't look
> like some of changes made it into the build.  The changes I made were,Making
> MessageResourceFactory serializable as well as modifying the setDefaultWriter
> method so it was always set to null.Making sure the following classes were
> serializable (some were, some
> weren't)ActionActionFormBeanActionFormBeansActionForwardActionForwardsActionMappingActionMappingsActionServlet-Matt

Of this list, the only non-Serializable classes in the current code are Action
and ActionServlet.  Neither of these is appropriately stored in a servlet
context attribute, and neither are ever stored there by the Struts framework
itself.

In addition, you must avoid the use of the <data-sources> automatic
initialization service, because JDBC connection pools (by their very nature)
cannot be Serializable.  J2EE application servers provide a standard mechanism
(via a JNDI InitialContext) to retrieve data sources, and you should use the
facilities provided by your app server vendor in those cases.

Craig McClanahan