Re: forms tag ? serialaizable

2003-03-25 Thread Vic Cekvenich

If you still have a serialization problem with a UserBean declared as you
indicate above, it's likely that one of the instance variables inside
UserBean (or its superclass) cannot actually be serialized.  For example,
if you've got an instance variable of type java.sql.Connection, you'd
definitely run into problems.
OK. Thanks, I had a field problem.
.V


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: forms tag ? serialaizable

2003-03-24 Thread Edgar P. Dollin
Your form beans should be serializable if you are keeping them in
session scope.  I am not familiar with scaffoldingLib but AFAIK the
straight struts ActionForm and derivatives all serialize OK.  Obviously,
everything you throw in an ActionForm must be serializable as well.
There are a few classes in the jdk which are not serializable, each of
which is listed in the javadoc.

Hope that helps

Edgar



 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
 Sent: Monday, March 24, 2003 5:03 PM
 To: '[EMAIL PROTECTED]'
 Subject: forms tag ? serialaizable
 
 
 AFAIK we can't specify the type of class that the form bean 
 is in, in 
 struts config. (not formbean, but form-beans )
 
 For example, form-beans type= myserilazableformbeanbase 
 
 This would allow me to implement session fail over of session beans.
 
 AFAIK, this was depercated in 1.1.
 Yes, this can be miss-used but
 
 So can someone educate me that this works, else it's a 
 feature request.
 
 Easy way to test is to add this to resin, for example:
session-config
  file-storeWEB-INF/session/file-store
/session-config
 
 This give me exception that formbean is not seriazable 
 (concreate class 
 is, ie form-bean name=userBean  
 type=org.apache.scaffoldingLib.beans.UserBean/ is, but the 
 base class 
 is not. This is true of Collections as well)
 
 tia,
 Vic
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forms tag ? serialaizable

2003-03-24 Thread Vic Cekvenich
SNIP
If your UserBean class declares implements Serializable, this means that
UserBean also takes responsibility for saving and restoring the instance
variables of the base class as well.  If it doesn't, then your UserBean
class is broken.  The only thing the container should need to do is an
instanceof Serializable test.


public class UserBean extends ValidatorForm
implements Serializable, Collection { // class }
My concreate does. But the container I think sees is as 
ValidatorForm which it tags as not Serializable and throws an 
exception. I could test by making ActionForm implement Seriazable, see 
if that fixes it.

tia,

.V


The servlet spec requires that a container disallow setting a session
attribute that is not Serializable if you use the distributable element
in your web.xml file.  Tomcat implements this behavior, and it should be
portable to any other container that conforms to the spec.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: forms tag ? serialaizable

2003-03-24 Thread Craig R. McClanahan


On Mon, 24 Mar 2003, Vic Cekvenich wrote:

 Date: Mon, 24 Mar 2003 18:55:00 -0500
 From: Vic Cekvenich [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: forms tag ? serialaizable

 SNIP
 
  If your UserBean class declares implements Serializable, this means that
  UserBean also takes responsibility for saving and restoring the instance
  variables of the base class as well.  If it doesn't, then your UserBean
  class is broken.  The only thing the container should need to do is an
  instanceof Serializable test.
 


 public class UserBean extends ValidatorForm
   implements Serializable, Collection { // class }

 My concreate does. But the container I think sees is as
 ValidatorForm which it tags as not Serializable and throws an
 exception. I could test by making ActionForm implement Seriazable, see
 if that fixes it.


What the container should do (and Tomcat in particular does) is an
instanceof Serializable check, which will return true if the base class
says implements Serializable (which is already true for ActionForm, and
therefore DynaActionForm) or whether the concrete class itself does (as in
your example above).

If you still have a serialization problem with a UserBean declared as you
indicate above, it's likely that one of the instance variables inside
UserBean (or its superclass) cannot actually be serialized.  For example,
if you've got an instance variable of type java.sql.Connection, you'd
definitely run into problems.


 tia,

 .V

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forms tag ? serialaizable

2003-03-24 Thread Chetan Sahasrabudhe
Craig:

I am using struts and am pretty impressed with the way you good ppl have
comeup with such a generic and helpful framework. I will like to contribute
in the development efforts, can any one tell me how can I contribute in this
great work.

Regards
Chetan
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 10:49 AM
Subject: Re: forms tag ? serialaizable




 On Mon, 24 Mar 2003, Vic Cekvenich wrote:

  Date: Mon, 24 Mar 2003 18:55:00 -0500
  From: Vic Cekvenich [EMAIL PROTECTED]
  Reply-To: Struts Developers List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: forms tag ? serialaizable
 
  SNIP
  
   If your UserBean class declares implements Serializable, this means
that
   UserBean also takes responsibility for saving and restoring the
instance
   variables of the base class as well.  If it doesn't, then your
UserBean
   class is broken.  The only thing the container should need to do is an
   instanceof Serializable test.
  
 
 
  public class UserBean extends ValidatorForm
  implements Serializable, Collection { // class }
 
  My concreate does. But the container I think sees is as
  ValidatorForm which it tags as not Serializable and throws an
  exception. I could test by making ActionForm implement Seriazable, see
  if that fixes it.
 

 What the container should do (and Tomcat in particular does) is an
 instanceof Serializable check, which will return true if the base class
 says implements Serializable (which is already true for ActionForm, and
 therefore DynaActionForm) or whether the concrete class itself does (as in
 your example above).

 If you still have a serialization problem with a UserBean declared as you
 indicate above, it's likely that one of the instance variables inside
 UserBean (or its superclass) cannot actually be serialized.  For example,
 if you've got an instance variable of type java.sql.Connection, you'd
 definitely run into problems.

 
  tia,
 
  .V

 Craig

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forms tag ? serialaizable

2003-03-24 Thread Craig R. McClanahan


On Tue, 25 Mar 2003, Chetan Sahasrabudhe wrote:

 Date: Tue, 25 Mar 2003 11:00:06 +0530
 From: Chetan Sahasrabudhe [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: Struts Developers List [EMAIL PROTECTED]
 Subject: Re: forms tag ? serialaizable

 Craig:

 I am using struts and am pretty impressed with the way you good ppl have
 comeup with such a generic and helpful framework. I will like to contribute
 in the development efforts, can any one tell me how can I contribute in this
 great work.


The short answer on getting involved in any Jakarta project starts at:

  http://jakarta.apache.org/site/getinvolved.html

For Struts in particular, we're trying to wrap up the 1.1 final release,
so looking at the outstanding bug reports:

  http://nagoya.apache.org/bugzilla/

for either Struts 1.1, or the Commons packages we rely on (beanutils,
collections, dbcp, digester, fileupload, lang, logging, pool, and
validator), and post suggested patches as an attachment to the bug report.

We'll also start discussing the next generation here on STRUTS-DEV, so
feel free to participate in the discussions with your own thoughts about
where Struts should go.  Eventually, a combination of code contributions
(patches and/or proposed enhancements) and contributions on STRUTS-DEV
will likely get you nominated as a committer -- besides having direct
commit access to the CVS repository, that also means you would have
binding votes on the future of Struts.

 Regards
 Chetan

Craig

PS:  it's considered rude on mailing lists to hijack someone elses thread
to talk about something different ... you should really start a new thread
instead :-)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forms tag ? serialaizable

2003-03-24 Thread David Graham
I will like to contribute in the development efforts, can any one tell me 
how can I contribute in this great work.
We really need people to work on the commons packages we're dependent on, 
specifically DBCP and Logging.  We finally got Struts itself down to 0 bugs 
(for now) and are now working on the commons stuff.

David

_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]