]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.util/src/org/argeo/osgi/useradmin/WcXaResource.java
LDAP support for hierarchy unit. Code clean up.
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / osgi / useradmin / WcXaResource.java
index 1630b6bd36befa841d3968b84d260750dda8e017..af0f351c77e6b9b9105ed8f0ef3e9a0f009837d2 100644 (file)
@@ -22,10 +22,10 @@ class WcXaResource implements XAResource {
        @Override
        public synchronized void start(Xid xid, int flags) throws XAException {
                if (editingXid != null)
-                       throw new UserDirectoryException("Already editing " + editingXid);
+                       throw new IllegalStateException("Already editing " + editingXid);
                UserDirectoryWorkingCopy wc = workingCopies.put(xid, new UserDirectoryWorkingCopy());
                if (wc != null)
-                       throw new UserDirectoryException("There is already a working copy for " + xid);
+                       throw new IllegalStateException("There is already a working copy for " + xid);
                this.editingXid = xid;
        }
 
@@ -43,7 +43,7 @@ class WcXaResource implements XAResource {
                        return null;
                UserDirectoryWorkingCopy wc = workingCopies.get(editingXid);
                if (wc == null)
-                       throw new UserDirectoryException("No working copy found for " + editingXid);
+                       throw new IllegalStateException("No working copy found for " + editingXid);
                return wc;
        }