You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/07/20 17:33:31 UTC

svn commit: r558022 - /incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java

Author: boisvert
Date: Fri Jul 20 08:33:30 2007
New Revision: 558022

URL: http://svn.apache.org/viewvc?view=rev&rev=558022
Log:
cache the inMemory flag because XMLBeans objects are heavily synchronized

Modified:
    incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java

Modified: incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java?view=diff&rev=558022&r1=558021&r2=558022
==============================================================================
--- incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java (original)
+++ incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java Fri Jul 20 08:33:30 2007
@@ -78,6 +78,9 @@
     private QName _pid;
     private QName _type;
 
+    // cache the inMemory flag because XMLBeans objects are heavily synchronized (guarded by a coarse-grained lock)
+    private volatile boolean _inMemory = false;
+
     ProcessConfImpl(QName pid, QName type, long version, DeploymentUnitDir du, TDeployment.Process pinfo, Date deployDate,
                     Map<QName, Node> props, ProcessState pstate) {
         _pid = pid;
@@ -88,6 +91,7 @@
         _props = Collections.unmodifiableMap(props);
         _state = pstate;
         _type = type;
+        _inMemory = _pinfo.isSetInMemory() && _pinfo.getInMemory();
 
         initLinks();
         initMexInterceptors();
@@ -268,10 +272,11 @@
     }
 
     public boolean isTransient() {
-        return _pinfo.isSetInMemory() && _pinfo.getInMemory();
+        return _inMemory;
     }
     public void setTransient(boolean t) {
         _pinfo.setInMemory(t);
+        _inMemory = t;
     }
 
     public boolean isEventEnabled(List<String> scopeNames, BpelEvent.TYPE type) {