[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] jetty-http / jsp / problem with session-scoped beans after bundle update
- From: Alex Blewitt <alex.blewitt@xxxxxxxxx>
- Date: Wed, 3 Mar 2010 01:24:51 +0000
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=AdnMPEWKzYb+d8lFWvH55t6yltfiqJkaCiLEOrOd19kgKMCsm/bgUeXdoFmKAoeXpE Jwc0HnEUoiUNJT9Wxnii96JGYoMfX0gJC+lwzzPK0wRS/QUXmsB4+OXprDaBBXgwQ+Hk VEqncqFyjM8dmDIVQ2SQ+Y8BfEXT0Fpwik+zU=
On 3 Mar 2010, at 00:51, Yuriy Malchenko wrote:
> Or maybe I should take the needed classes (session/application scoped)
> to a separate bundle which will not be needed to update frequently?
> But anyway sometimes it might, so it's not a good solution.
It's generally a good idea to separate out interfaces/classes which are going to be exposed to the end user and make them available in a separate bundle, whilst having your logic/program in a different bundle. Then you can throw away the program and reinstantiate it after update, but keep your data objects/interfaces the same.
Note that applies to a number of other cases where the implementation must be bounced but whilst maintaining the same interface classes; it's not unique to servlets or JSPs, though of course, you notice these in situations like this.
The other approach is to drop all sessions when you reload the code, which doesn't sound like a sensible solution.