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
 

Reply via email to