You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by David Graham <dg...@hotmail.com> on 2003/02/05 04:05:27 UTC

ModuleConfigImpl holds reference to factory

ModuleConfigImpl implements Serializable but the ModuleConfigFactory 
interface does not.  ModuleConfigImpl has a member variable that stores its 
factory but never actually uses that variable.  We have 2 options:

1.  Remove the factory variable from ModuleConfigImpl and the constructor 
that sets it.  (my favorite)

2.  Make the factory variable transient and add a setFactory() method 
because there is no way to reset the variable after deserialization.

Comments?  I see no problem with number 1 so I'll make the change in a 
couple days if no one objects.

David





_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: ModuleConfigImpl holds reference to factory

Posted by Robert Leland <rl...@apache.org>.
On Tue, 4 Feb 2003, David Graham wrote:


>Date: Tue, 04 Feb 2003 20:05:27 -0700
>From: David Graham <dg...@hotmail.com>
>Reply-To: Struts Developers List <st...@jakarta.apache.org>
>To: struts-dev@jakarta.apache.org
>Subject: ModuleConfigImpl holds reference to factory
>
>ModuleConfigImpl implements Serializable but the ModuleConfigFactory
>interface does not.  ModuleConfigImpl has a member variable that stores its
>factory but never actually uses that variable.  We have 2 options:
>
>1.  Remove the factory variable from ModuleConfigImpl and the constructor
>that sets it.  (my favorite)

+1, I plead guilty. I had noticed that the commons-pool or 
commons-collections had a pointer back to the factory.
So I used that pattern w/o a use case to support it !



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: ModuleConfigImpl holds reference to factory

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 4 Feb 2003, David Graham wrote:

> Date: Tue, 04 Feb 2003 20:05:27 -0700
> From: David Graham <dg...@hotmail.com>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>
> To: struts-dev@jakarta.apache.org
> Subject: ModuleConfigImpl holds reference to factory
>
> ModuleConfigImpl implements Serializable but the ModuleConfigFactory
> interface does not.  ModuleConfigImpl has a member variable that stores its
> factory but never actually uses that variable.  We have 2 options:
>
> 1.  Remove the factory variable from ModuleConfigImpl and the constructor
> that sets it.  (my favorite)
>
> 2.  Make the factory variable transient and add a setFactory() method
> because there is no way to reset the variable after deserialization.
>
> Comments?  I see no problem with number 1 so I'll make the change in a
> couple days if no one objects.
>

The grand prize is hiding behind Door #1.

:-)

> David
>

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: ModuleConfigImpl holds reference to factory

Posted by Mohan Kishore <mo...@yahoo.com>.
This came up once before: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16704 Had posted an explanation with patch - hope that helps....
 David Graham <dg...@hotmail.com> wrote:ModuleConfigImpl implements Serializable but the ModuleConfigFactory 
interface does not. ModuleConfigImpl has a member variable that stores its 
factory but never actually uses that variable. We have 2 options:

1. Remove the factory variable from ModuleConfigImpl and the constructor 
that sets it. (my favorite)

2. Make the factory variable transient and add a setFactory() method 
because there is no way to reset the variable after deserialization.

Comments? I see no problem with number 1 so I'll make the change in a 
couple days if no one objects.

David





_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mohan Kishore
732 Marlin Ave, Apt 4
Foster City, CA 94404
mohankishore@yahoo.com


---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now