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

2001-01-10 Thread Craig R. McClanahan

"Craig R. McClanahan" wrote:

>
> The basic Struts framework no longer creates any non-Serializable servlet
> context attributes.  The new MessageResources implementation was completed
> last week.
>

As I pointed out in a subsequent message on this thread ... you need to avoid
the use of the  initialization service if your container requires
context attributes to be serializable.  In such cases, the app server will
provide an alternative means (JNDI InitialContext) to gain access to the data
sources you need.

Craig





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

2001-01-10 Thread Craig R. McClanahan


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  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
 


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

2001-01-10 Thread Craig R. McClanahan


"Ludwig, Pat" wrote:
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

The basic Struts framework no longer creates any non-Serializable
servlet context attributes.  The new MessageResources implementation
was completed last week.
The Struts Example application continues to use a non-Serializable servlet
context for its pseudo-database -- due to the "quick and dirty" design
of this thing, it is not appropriate to be Serializable.  Therefore,
the example app will *not* run on any app server that requires context
attributes to be Serializable until this design is changed.  However,
this will not affect apps that you write on top of the rest of the Struts
framework, as long as your own application-scope objects obey the rules.
Craig
 


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

2001-01-10 Thread Matthew Heaton



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:[EMAIL PROTECTED]]Sent: Wednesday, January 10, 2001 
  1:06 PMTo: 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