portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: [J2] re/undeployment and portlet entities and user preferences
Date Fri, 02 Jul 2004 22:50:13 GMT

On Jul 2, 2004, at 2:54 PM, Scott T Weaver wrote:

> I have come to the conclusion through my own experience and through
> discussions with other developers here that automatically purging
> portlet entities/user prefs on undeployment is a BAD IDEA.
>
>> From a programmer's standpoint and referential integrity standpoint 
>> you
> should remove these associations when a portlet definition is removed
> from the system.  However, from a real world/usability stand point this
> is very bad.  What if someone "accidentally" undeploys a portlet app?

If you are saying that undeploy only deletes the portlets and PA from 
the registry,
then when happens when the user visits the page that contains a portlet 
window with a ref
to the entity, which in turn contains a ref to the portlet def, which 
has been deleted?
You now have referential integrity violations and portlets displaying 
error messages or empty content

if undeploy doesn't undeploy everything, you are leaving your model in 
bad state


> All the user info tied to that app (via prefs) is lost.  I feel a 
> better
> approach is to give admins the ability to go in and query for orphaned
> entities (those whose app/portlet no longer exists in the system) and
> remove them.  Also, to make sure entities connect up to there 
> associated
> app across re-deployments, I changed the DB association between 
> entities
> and portlets to use app name and portlet name as opposed to the PK of
> the portlet def since the PK is transient across redployment.
>
I am +1 on that for the redeploy case
Im not saying I disagree, but it sounds to me like you are just trying 
to make an argument for using the existing
deploy and undeploy operations to implement redeploy

> Please offer your suggestions/criticisms to this approach.
>
here is my suggestion offered on June 30, 2004

On Jun 30, 2004, at 9:30 AM, Scott T Weaver wrote:
>
> Actually, IMOHO, redeployment should not delete the associated
> entities.  The reason being is that every time you redeploy an app all
> of the user prefs get blown away.
>

On Wed, 2004-06-30 at 11:52, David Sean Taylor wrote:

yes, but you don't know if the portlet will exist again after redeploy
The portlet could be removed from the deployment descriptor
Does that mean the portal should remove the portlet and all entities?
AFAIK the spec is not addressing this issue, so its up to us

When we undeploy now, the portlets are deleted
If the portlets are deleted, normal ref integrity rules would require 
also deleting the entities and psml refs
However this has some bad side effects
If you redeploy, you run undeploy, and lose all of your entities

To get to the root of the problem, I think redeploy should be smart 
enough to know which portlets are being deleted and which ones are 
being replaced
This would mean that redeploy is an atomic API, and shouldn't rely 
solely on undeploy and deploy to perform its transaction

I think that redeploy and undeploy should be 2 different operations


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


Mime
View raw message