trap exceptions during session events and ensure pick messages are blocked whilst...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 19 Mar 2007 13:26:04 +0000 (13:26 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 19 Mar 2007 13:26:04 +0000 (13:26 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@366 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/simpleclient/EventGeneratorThread.java

index ded388f..1d1cf09 100644 (file)
@@ -87,7 +87,11 @@ public class EventGeneratorThread {
     PropertyChangeSupport h = (PropertyChangeSupport) handlers.get(handlerEvent);
     if (h!=null) {
       log.debug("Triggering:"+handlerEvent);
-      h.firePropertyChange(property, oldval, newval);
+      try {
+        h.firePropertyChange(property, oldval, newval);
+      } catch (Exception e) {
+        log.warn("Client Exception during handling of "+handlerEvent, e);
+      }
       log.debug("Finished  :"+handlerEvent);
     } else
       log.debug("No handlers for raised "+handlerEvent);
@@ -109,8 +113,12 @@ public class EventGeneratorThread {
     boolean continueWatching=true;
     if (!block_document_updates) {
       session.vamArchive.fileLock=doclock;
+      if (client.pickmanager!=null)
+        client.pickmanager.setPassThru(false);
       // TODO: decide if individual object update handlers are called as well as overall event handler
       _raise(Events.DOCUMENT_UPDATE, client.getSessionUrn(), null, client);
+      if (client.pickmanager!=null)
+        client.pickmanager.setPassThru(true);
       if (log.isDebugEnabled()) {
         log.debug("Finished handling a documentChanged event. Document is "+(client.cdocument==null ? "closed" : "open"));
       }