portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl PropertyManagerImpl.java
Date Sun, 07 Mar 2004 16:42:36 GMT
dlestrat    2004/03/07 08:42:36

  Modified:    components/prefs/src/java/org/apache/jetspeed/prefs/impl
                        PropertyManagerImpl.java
  Log:
  Removed LockFailedException.
  
  Revision  Changes    Path
  1.3       +15 -7     jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PropertyManagerImpl.java
  
  Index: PropertyManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PropertyManagerImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertyManagerImpl.java	6 Mar 2004 18:31:01 -0000	1.2
  +++ PropertyManagerImpl.java	7 Mar 2004 16:42:36 -0000	1.3
  @@ -27,7 +27,6 @@
   
   import org.apache.jetspeed.components.persistence.store.PersistenceStore;
   import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer;
  -import org.apache.jetspeed.components.persistence.store.impl.LockFailedException;
   import org.apache.jetspeed.prefs.PropertyManager;
   import org.apache.jetspeed.prefs.om.Node;
   import org.apache.jetspeed.prefs.om.Property;
  @@ -145,9 +144,12 @@
                   nodeObj.setModifiedDate(new Timestamp(System.currentTimeMillis()));
                   store.getTransaction().checkpoint();
               }
  -            catch (LockFailedException lfe)
  +            catch (Exception e)
               {
  -                throw new PropertyException("Unable to lock Node for update: " + lfe.toString(),
lfe);
  +                String msg = "Unable to lock Node for update.";
  +                log.error(msg, e);
  +                store.getTransaction().rollback();
  +                throw new PropertyException(msg, e);
               }
           }
           else
  @@ -250,9 +252,12 @@
                   nodeObj.setModifiedDate(new Timestamp(System.currentTimeMillis()));
                   store.getTransaction().checkpoint();
               }
  -            catch (LockFailedException lfe)
  +            catch (Exception e)
               {
  -                throw new PropertyException("Unable to lock Node for update: " + lfe.toString(),
lfe);
  +                String msg = "Unable to lock Node for update.";
  +                log.error(msg, e);
  +                store.getTransaction().rollback();
  +                throw new PropertyException(msg, e);
               }
           }
           else
  @@ -307,9 +312,12 @@
                                   log.debug("Updated property key: " + curPropKey.toString());
                               store.getTransaction().checkpoint();
                           }
  -                        catch (LockFailedException lfe)
  +                        catch (Exception e)
                           {
  -                            throw new PropertyException("Unable to lock Node for update:
" + lfe.toString(), lfe);
  +                            String msg = "Unable to lock Node for update.";
  +                            log.error(msg, e);
  +                            store.getTransaction().rollback();
  +                            throw new PropertyException(msg, e);
                           }
                       }
                   }
  
  
  

---------------------------------------------------------------------
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