portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Müller (JIRA) <jetspeed-...@portals.apache.org>
Subject [jira] Commented: (JS2-666) Clustered Environment: constraint violation if clones are started at the same time
Date Tue, 18 Sep 2007 14:35:43 GMT

    [ https://issues.apache.org/jira/browse/JS2-666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528397

Joachim Müller commented on JS2-666:

I have attached a patch that addresses the problem.

It solves the problem as follows:

1.) It introduces an (optional) configurable maxRetriedStart Parameter (defaults to 10). This
parameter defines how often the PA (portlet application) manager will try to restart a PA
on error.

2.) A PA registration error on startup does not lead into NOT register the PA anymore. The
descriptor change monitor is always started for the PA, also in case of an registration error.

3.) The description change monitor tries to start the PA if
  a.) the PA descriptors have changed OR
  b.) the previous start of the PA was unsuccessful, as long as the number of unsuccessful
starts does not exceed maxRetriedStart (defaults to 10)

This means that in a cluster (we presume identical portlet descriptors here) the cluster nodes
can "delay" the PA registration if the node encounters registration problems (like the described
constraint violation). If the problem is not recoverable (portlet.xml is destroyed) in deactivated
the re-registration after a number of retries (but restarts registration on PA descriptor

Still the registration of the PA and the synchronization of the PA descriptors with the database
is based on the picked up changes of the (file based) PA descriptors. The cluster nodes will
not pick up changes of the PA introduced by another cluster node as long as they are not restarted.

> Clustered Environment: constraint violation if clones are started at the same time
> ----------------------------------------------------------------------------------
>                 Key: JS2-666
>                 URL: https://issues.apache.org/jira/browse/JS2-666
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Portlet Registry
>    Affects Versions: 2.1
>         Environment: Websphere Application Server 6.0
> Database DB2 8.2
>            Reporter: Frank Stalherm
>             Fix For: 2.2
> Clustered Environment: constraint violation if clones are started at the same time.
> Exception thrown:
> com.ibm.websphere.ce.cm.DuplicateKeyException: [IBM][CLI Driver][DB2/6000] SQL0803N 
One or more values in the INSERT statement, UPDATE statement, or foreign key update caused
by a DELETE statement are not valid because the primary key, unique constraint or unique index
identified by "2" constrains table "PORTLET_APPLICATION" from having duplicate rows for those
columns.  SQLSTATE=23505
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java(Compiled
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
> 	at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:502)
> 	at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:545)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.mapException(WSJdbcUtil.java:902)
> 	at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:555)
> 	at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:216)
> 	at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1754)
> 	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:813)
> 	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:726)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message