[Seaside] Re: Zinc adaptor zombie

Sven Van Caekenberghe sven at beta9.be
Mon Jul 2 11:58:14 UTC 2012


Esteban,

On 01 Jul 2012, at 11:19, Esteban Lorenzano wrote:

> Hi Sven,
> 
> no... problem is that 
> 
> 1) you create a server with zinc adaptor
> 2) you need to change it to use comanche, then you stop one, start the other [1].
> 3) when you save image, ZnServer is restarted anyway.

OK, I understand now and I could reproduce it.

But this is a Seaside issue/feature: WAServerManager will send #startUp to all its adaptors, regardless whether they were stopped manually or not, it wants them all to be running after a restart.

I think that sending #unregister to an adaptor would be the behavior you are looking for.

When WAServerManager sends #startUp to a stopped ZnZincServerAdaptor things go wrong (essentially #basicStart is needed), indeed. Thanks for pointing that out, I added some changes to Zinc-Seaside so that the lazy initialization in #server is not called unnecessary.

==================== Summary ====================

Name: Zinc-Seaside-SvenVanCaekenberghe.31
Author: SvenVanCaekenberghe
Time: 2 July 2012, 1:55:58 pm
UUID: 540e70b1-fd93-42d8-b05b-18f15c9ae5b4
Ancestors: Zinc-Seaside-PaulDeBruicker.30

bring some sanity to how #server lazy initialization was handled;
changed semantics of #startUp to do a #basicStart when the server was stopped

=================================================

Sven

> [1] My *real* problem is that I cannot use Zinc Adaptor in certain cases: When I use seaside rest to do a put, rawBody is always empty.

That should normally work, as far as I know. Could you provided more information, preferrably a use case against one of the test handlers ?

Thx.

> best,
> Esteban
> 
> On Jul 1, 2012, at 11:07 AM, Sven Van Caekenberghe wrote:
> 
>> Hi Esteban,
>> 
>> On 01 Jul 2012, at 10:38, Esteban Lorenzano wrote:
>> 
>>> Hi, 
>>> 
>>> look at this code: 
>>> 
>>> ZnZincServerAdaptor>>#server
>>> 	"Return the ZnServer running me, create a default one if missing"
>>> 	
>>> 	^ server ifNil: [ server := self defaultZnServer ].
>>> 
>>> 
>>> ...and...
>>> 
>>> ZnZincServerAdaptor>>#startUp
>>> 	self server isNil
>>> 		ifFalse: [ self server start ]
>>> 
>>> so... this will stay alive for ever... even if you try to kill him with a shotgun (and yes... is a brain eater) :)
>>> 
>>> Esteban
>> 
>> I am not sure I understand the question here.
>> AFAIK, the lifecycle of a Seaside adaptor is controlled by the manager, not the instance itself.
>> When you first create an adaptor it will only lazily create the server and then start it.
>> When you stop an adaptor, the Zn server will stop, but indeed the instance stays put, which should not be a problem.
>> There is always the option to remove the adaptor from the manager, and everything should become garbage, no ?
>> 
>> Sven
>> 
>> 
>> --
>> Sven Van Caekenberghe
>> http://stfx.eu
>> Smalltalk is the Red Pill
>> 
> 



More information about the seaside mailing list