exo-jcr SVN: r1758 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2010-02-10 13:56:54 -0500 (Wed, 10 Feb 2010)
New Revision: 1758
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
Log:
EXOJCR-499: The method get returns null to avoid useless JBC Node creation
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-02-10 17:21:58 UTC (rev 1757)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-02-10 18:56:54 UTC (rev 1758)
@@ -21,7 +21,6 @@
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.loader.AbstractCacheLoader;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -53,7 +52,7 @@
*/
public Map<Object, Object> get(Fqn arg0) throws Exception
{
- return Collections.emptyMap();
+ return null;
}
/**
14 years, 5 months
exo-jcr SVN: r1757 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-10 12:21:58 -0500 (Wed, 10 Feb 2010)
New Revision: 1757
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
Log:
EXOJCR-305 NodeImpl cleanup
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10 17:21:58 UTC (rev 1757)
@@ -1355,43 +1355,10 @@
{
checkValid();
- //TODO return isLocked((NodeData)this.getData());
return session.getLockManager().isLocked((NodeData)this.getData());
}
/**
- * Checks if a given node is locked only if the node is not new otherwise, we check the first
- * ancestor that is not new
- * @param data the data of the node to check
- * @return <code>true</code> if the node is locked, <code>false</code> otherwise
- * @throws RepositoryException if an error occurs
- */
- // TODO
- private boolean isLocked(NodeData data) throws RepositoryException
- {
- if (dataManager.isNew(data.getIdentifier()))
- {
- // The node is new, so we will check directly its parent instead
- NodeData parentData = (NodeData)dataManager.getItemData(data.getParentIdentifier());
- if (parentData == null)
- {
- // The node is the root node and is new, so we consider it as unlocked
- return false;
- }
- else
- {
- // the node has a parent that we need to test
- return isLocked(parentData);
- }
- }
- else
- {
- // The node already exists so we need to check if it is locked
- return session.getLockManager().isLocked(data);
- }
- }
-
- /**
* {@inheritDoc}
*/
public boolean isNode()
14 years, 5 months
exo-jcr SVN: r1756 - in jcr/trunk/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/lock and 3 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-10 12:19:14 -0500 (Wed, 10 Feb 2010)
New Revision: 1756
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractSessionLockManager.java
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/WorkspaceLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-305 move node lock check to AbstractSessionLockManager, it's base class for SessionLockManager impls
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -1355,7 +1355,8 @@
{
checkValid();
- return isLocked((NodeData)this.getData());
+ //TODO return isLocked((NodeData)this.getData());
+ return session.getLockManager().isLocked((NodeData)this.getData());
}
/**
@@ -1365,6 +1366,7 @@
* @return <code>true</code> if the node is locked, <code>false</code> otherwise
* @throws RepositoryException if an error occurs
*/
+ // TODO
private boolean isLocked(NodeData data) throws RepositoryException
{
if (dataManager.isNew(data.getIdentifier()))
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -156,8 +156,6 @@
this.systemLocationFactory = (LocationFactory)container.getComponentInstanceOfType(LocationFactory.class);
this.accessManager = (AccessManager)container.getComponentInstanceOfType(AccessManager.class);
- this.lockManager =
- ((WorkspaceLockManager)container.getComponentInstanceOfType(WorkspaceLockManager.class)).getSessionLockManager(id);
WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class);
this.lazyReadThreshold =
@@ -182,6 +180,10 @@
this.dataManager = new SessionDataManager(this, workspaceDataManager);
+ this.lockManager =
+ ((WorkspaceLockManager)container.getComponentInstanceOfType(WorkspaceLockManager.class))
+ .getSessionLockManager(id, dataManager);
+
this.nodeTypeManager = (NodeTypeDataManager)container.getComponentInstanceOfType(NodeTypeDataManager.class);
this.workspace = new WorkspaceImpl(workspaceName, container, this, observationManager);
Added: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractSessionLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractSessionLockManager.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractSessionLockManager.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.core.lock;
+
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+
+/**
+ * @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter Nedonosko</a>
+ * @version $Id:AbstractSessionLockManager.java 1111 2010-01-01 00:00:01Z pnedonosko $
+ *
+ */
+public abstract class AbstractSessionLockManager implements SessionLockManager
+{
+
+ protected final SessionDataManager transientManager;
+
+ public AbstractSessionLockManager(SessionDataManager transientManager)
+ {
+ this.transientManager = transientManager;
+ }
+
+ /**
+ * Check if the node locked (and lock peristed in internal storage).
+ * @param node NodeData to check
+ * @return boolean, <code>true</code> if the node is locked, <code>false</code> otherwise
+ * @throws LockException
+ */
+ protected abstract boolean isLockedPersisted(NodeData node) throws LockException;
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isLocked(NodeData data) throws LockException
+ {
+ if (transientManager.isNew(data.getIdentifier()))
+ {
+ // The node is new, so we will check directly its parent instead
+ try
+ {
+ NodeData parentData = (NodeData)transientManager.getItemData(data.getParentIdentifier());
+ if (parentData == null)
+ {
+ // The node is the root node and is new, so we consider it as unlocked
+ return false;
+ }
+ else
+ {
+ // the node has a parent that we need to test
+ return isLocked(parentData);
+ }
+ }
+ catch (RepositoryException e)
+ {
+ throw new LockException(e);
+ }
+ }
+ else
+ {
+ // The node already exists so we need to check if it is locked
+ return isLockedPersisted(data);
+ }
+ }
+
+}
Property changes on: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractSessionLockManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -41,6 +41,7 @@
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.NodeImpl;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
@@ -168,12 +169,6 @@
dataManager.addItemPersistenceListener(this);
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#lockTokenAdded(org.exoplatform.services
- * .jcr.impl.core.SessionImpl, java.lang.String)
- */
public synchronized void addLockToken(String sessionId, String lt)
{
LockData currLock = tokensMap.get(lt);
@@ -183,12 +178,6 @@
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#addPendingLock(org.exoplatform.services
- * .jcr.impl.core.NodeImpl, boolean, boolean, long)
- */
public synchronized Lock addPendingLock(NodeImpl node, boolean isDeep, boolean isSessionScoped, long timeOut)
throws LockException
{
@@ -223,12 +212,6 @@
return lock;
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#getLock(org.exoplatform.services.jcr
- * .impl.core.NodeImpl)
- */
public LockImpl getLock(NodeImpl node) throws LockException, RepositoryException
{
@@ -242,10 +225,6 @@
return new LockImpl(node.getSession(), lData);
}
- /*
- * (non-Javadoc)
- * @see org.exoplatform.services.jcr.impl.core.lock.LockManager#getLockTokens(java.lang.String)
- */
public synchronized String[] getLockTokens(String sessionID)
{
List<String> retval = new ArrayList<String>();
@@ -259,23 +238,11 @@
return retval.toArray(new String[retval.size()]);
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#holdsLock(org.exoplatform.services.
- * jcr.impl.core.NodeImpl)
- */
public boolean holdsLock(NodeData node) throws RepositoryException
{
return getLockData(node, SEARCH_EXECMATCH) != null;
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#isLocked(org.exoplatform.services.jcr
- * .datamodel.NodeData)
- */
public boolean isLocked(NodeData node)
{
LockData lData = getLockData(node, SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
@@ -287,24 +254,12 @@
return true;
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#isLockHolder(org.exoplatform.services
- * .jcr.impl.core.NodeImpl)
- */
public boolean isLockHolder(NodeImpl node) throws RepositoryException
{
LockData lData = getLockData((NodeData)node.getData(), SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
return lData != null && lData.isLockHolder(node.getSession().getId());
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.core.SessionLifecycleListener#onCloseSession(org.exoplatform.services
- * .jcr.core.ExtendedSession)
- */
public synchronized void onCloseSession(ExtendedSession session)
{
// List<String> deadLocksList = new ArrayList<String>();
@@ -367,10 +322,8 @@
}
}
- /*
- * (non-Javadoc)
- * @seeorg.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener#onSaveItems(org.
- * exoplatform.services.jcr.dataflow.ItemStateChangesLog)
+ /**
+ * {@inheritDoc}
*/
public void onSaveItems(ItemStateChangesLog changesLog)
{
@@ -495,11 +448,9 @@
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.exoplatform.services.jcr.impl.core.lock.LockManager#lockTokenRemoved(org.exoplatform.services
- * .jcr.impl.core.SessionImpl, java.lang.String)
+ /**
+ * @param sessionId
+ * @param lt
*/
public synchronized void removeLockToken(String sessionId, String lt)
{
@@ -510,9 +461,8 @@
}
}
- /*
- * (non-Javadoc)
- * @see org.picocontainer.Startable#start()
+ /**
+ * {@inheritDoc}
*/
public void start()
{
@@ -526,7 +476,7 @@
}
/**
- * Remove expired locks. Used from LockRemover.
+ * {@inheritDoc}
*/
public synchronized void removeExpired()
{
@@ -546,9 +496,8 @@
}
}
- /*
- * (non-Javadoc)
- * @see org.picocontainer.Startable#stop()
+ /**
+ * {@inheritDoc}
*/
public void stop()
{
@@ -794,11 +743,17 @@
return true;
}
- public SessionLockManager getSessionLockManager(String sessionId)
+ /**
+ * {@inheritDoc}
+ */
+ public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
{
- return new SessionLockManagerImpl(sessionId, this);
+ return new SessionLockManagerImpl(sessionId, this, transientManager);
}
+ /**
+ * {@inheritDoc}
+ */
public void closeSessionLockManager(String sessionId)
{
//do nothing
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -19,6 +19,7 @@
import org.exoplatform.services.jcr.core.ExtendedSession;
import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.impl.core.NodeImpl;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import javax.jcr.RepositoryException;
import javax.jcr.lock.Lock;
@@ -30,9 +31,9 @@
* <br/>Date:
*
* @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: SessionLockManagerImpl.java 111 2008-11-11 11:11:11Z serg $
+ * @version $Id$
*/
-public class SessionLockManagerImpl implements SessionLockManager
+public class SessionLockManagerImpl extends AbstractSessionLockManager
{
private final String sessionId;
@@ -42,8 +43,9 @@
/**
* Constructor
*/
- public SessionLockManagerImpl(String sessionId, LockManagerImpl lockManager)
+ public SessionLockManagerImpl(String sessionId, LockManagerImpl lockManager, SessionDataManager transientManager)
{
+ super(transientManager);
this.sessionId = sessionId;
this.lockManager = lockManager;
}
@@ -100,7 +102,7 @@
/**
* {@inheritDoc}
*/
- public boolean isLocked(NodeData node) throws LockException
+ protected boolean isLockedPersisted(NodeData node) throws LockException
{
return lockManager.isLocked(node);
}
Property changes on: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/WorkspaceLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/WorkspaceLockManager.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/WorkspaceLockManager.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.impl.core.lock;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
+
/**
* @author <a href="mailto:Sergey.Kabashnyuk@gmail.com">Sergey Kabashnyuk</a>
* @version $Id: LockManager.java 11907 2008-03-13 15:36:21Z ksm $
@@ -32,10 +34,10 @@
/**
* Returns session lock manager that interact with this LockManager.
*
- * @param sessionId - session ID
- * @return new SessionLockManager
+ * @param sessionId String, session ID
+ * @return transientManager SessionLockManager
*/
- SessionLockManager getSessionLockManager(String sessionId);
+ SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager);
/**
* Release all resources associated with CacheableSessionLockManager.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -66,15 +66,6 @@
String getLockTokenHash(String lockToken);
/**
- * Return lock holding node.
- *
- * @param node NodeData
- * @return LockData for node or null;
- * @throws RepositoryException
- */
- //LockData getExactNodeLock(NodeData node) throws RepositoryException;
-
- /**
* Return Lock holding node or its parent.
*
* @param node - NodeData
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -40,6 +40,7 @@
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import org.exoplatform.services.jcr.impl.core.lock.LockRemover;
import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
@@ -466,9 +467,9 @@
/**
* Return new instance of session lock manager.
*/
- public SessionLockManager getSessionLockManager(String sessionId)
+ public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
{
- CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this);
+ CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this, transientManager);
sessionLockManagers.put(sessionId, sessionManager);
return sessionManager;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -20,9 +20,10 @@
import org.exoplatform.services.jcr.core.ExtendedSession;
import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.impl.core.NodeImpl;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.impl.core.lock.AbstractSessionLockManager;
import org.exoplatform.services.jcr.impl.core.lock.LockImpl;
-import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
import org.exoplatform.services.jcr.util.IdGenerator;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -44,9 +45,9 @@
* <br/>Date:
*
* @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: SessionLockManager.java 111 2008-11-11 11:11:11Z serg $
+ * @version $Id$
*/
-public class CacheableSessionLockManager implements SessionLockManager
+public class CacheableSessionLockManager extends AbstractSessionLockManager
{
/**
* Logger
@@ -86,8 +87,9 @@
* @param sessionID - session identifier
* @param lockManager - workspace lock manager
*/
- public CacheableSessionLockManager(String sessionID, CacheableLockManager lockManager)
+ public CacheableSessionLockManager(String sessionID, CacheableLockManager lockManager, SessionDataManager transientManager)
{
+ super(transientManager);
this.sessionID = sessionID;
this.tokens = new HashMap<String, String>();
this.lockedNodes = new HashMap<String, LockData>();
@@ -183,7 +185,7 @@
/**
* {@inheritDoc}
*/
- public boolean isLocked(NodeData node) throws LockException
+ protected boolean isLockedPersisted(NodeData node) throws LockException
{
LockData lData = null;
try
Property changes on: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java 2010-02-10 17:19:14 UTC (rev 1756)
@@ -39,6 +39,7 @@
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import org.exoplatform.services.jcr.impl.core.lock.LockRemover;
import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager;
@@ -178,7 +179,6 @@
RepositoryException
{
this(dataManager, config, context, (TransactionManager)null, cfm);
-
}
/**
@@ -302,9 +302,9 @@
/**
* Return new instance of session lock manager.
*/
- public SessionLockManager getSessionLockManager(String sessionId)
+ public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
{
- CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this);
+ CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this, transientManager);
sessionLockManagers.put(sessionId, sessionManager);
return sessionManager;
}
@@ -335,10 +335,8 @@
return true;
}
- /*
- * (non-Javadoc)
- * @seeorg.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener#onSaveItems(org.
- * exoplatform.services.jcr.dataflow.ItemStateChangesLog)
+ /**
+ * {@inheritDoc}
*/
public void onSaveItems(ItemStateChangesLog changesLog)
{
@@ -594,18 +592,16 @@
}
}
- /*
- * (non-Javadoc)
- * @see org.picocontainer.Startable#start()
+ /**
+ * {@inheritDoc}
*/
public void start()
{
lockRemover = new LockRemover(this);
}
- /*
- * (non-Javadoc)
- * @see org.picocontainer.Startable#stop()
+ /**
+ * {@inheritDoc}
*/
public void stop()
{
@@ -638,7 +634,7 @@
}
/**
- * Internal lock
+ * Internal lock.
*
* @param nodeIdentifier
* @throws LockException
@@ -811,64 +807,6 @@
/**
* {@inheritDoc}
*/
- // public LockData getLockData(NodeData data, int searchType) throws LockException
- // {
- // if (data == null)
- // return null;
- // LockData retval = null;
- // try
- // {
- // if ((searchType & SEARCH_EXECMATCH) != 0)
- // {
- // retval = getLockDataById(data.getIdentifier());
- // }
- // if (retval == null && (searchType & SEARCH_CLOSEDPARENT) != 0)
- // {
- //
- // NodeData parentData = (NodeData)dataManager.getItemData(data.getParentIdentifier());
- // if (parentData != null)
- // {
- // retval = getLockDataById(parentData.getIdentifier());
- // // parent not found try to fo upper
- // if (retval == null)
- // {
- // retval = getLockData(parentData, SEARCH_CLOSEDPARENT);
- // }
- // }
- // }
- // if (retval == null && (searchType & SEARCH_CLOSEDCHILD) != 0)
- // {
- //
- // List<NodeData> childData = dataManager.getChildNodesData(data);
- // for (NodeData nodeData : childData)
- // {
- // retval = getLockDataById(nodeData.getIdentifier());
- // if (retval != null)
- // break;
- // }
- // if (retval == null)
- // {
- // // child not found try to find diper
- // for (NodeData nodeData : childData)
- // {
- // retval = getLockData(nodeData, SEARCH_CLOSEDCHILD);
- // if (retval != null)
- // break;
- // }
- // }
- // }
- // }
- // catch (RepositoryException e)
- // {
- // throw new LockException(e.getMessage(), e);
- // }
- //
- // return retval;
- // }
-
- /**
- * {@inheritDoc}
- */
public LockData getExactNodeOrCloseParentLock(NodeData node) throws RepositoryException
{
if (node == null)
@@ -889,19 +827,6 @@
/**
* {@inheritDoc}
*/
- // public LockData getExactNodeLock(NodeData node) throws RepositoryException
- // {
- // LockData retval = null;
- // if (node != null)
- // {
- // retval = getLockDataById(node.getIdentifier());
- // }
- // return retval;
- // }
-
- /**
- * {@inheritDoc}
- */
public LockData getClosedChild(NodeData node) throws RepositoryException
{
LockData retval = null;
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 15:48:06 UTC (rev 1755)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 17:19:14 UTC (rev 1756)
@@ -64,8 +64,7 @@
<property name="restore-path" value="./sv_export_root.xml" />
<property name="restore-path" value="./src/test/resources/import-export/restore_db1_ws1.xml" />
</properties>
- </initializer
--->
+ </initializer -->
<cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
<property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config.xml" />
14 years, 5 months
exo-jcr SVN: r1755 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-02-10 10:48:06 -0500 (Wed, 10 Feb 2010)
New Revision: 1755
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-470: If parameter is still defined and equals to "auto", it should be replaced with correct value for given data base.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 12:16:57 UTC (rev 1754)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 15:48:06 UTC (rev 1755)
@@ -113,6 +113,8 @@
public static final String JBOSSCACHE_JDBC_CL_NODE_COLUMN = "jbosscache-cl-cache.jdbc.node.type";
public static final String JBOSSCACHE_JDBC_CL_FQN_COLUMN = "jbosscache-cl-cache.jdbc.fqn.type";
+
+ public static final String JBOSSCACHE_JDBC_CL_AUTO = "auto";
/**
* Default lock time out. 30min
@@ -356,12 +358,15 @@
// else GENERIC, DB2 etc
// set parameters if not defined
- if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, null) == null)
+ // if parameter is missing in configuration, then getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO)
+ // will return JBOSSCACHE_JDBC_CL_AUTO. If parameter is present in configuration and equals to "auto", then it should be replaced
+ // with correct value for given database
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO).equalsIgnoreCase(JBOSSCACHE_JDBC_CL_AUTO))
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, blobType);
}
- if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, null) == null)
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, JBOSSCACHE_JDBC_CL_AUTO).equalsIgnoreCase(JBOSSCACHE_JDBC_CL_AUTO))
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
}
14 years, 5 months
exo-jcr SVN: r1754 - in jcr/trunk/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache and 4 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-10 07:16:57 -0500 (Wed, 10 Feb 2010)
New Revision: 1754
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCContainer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-485 auto dialect added
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2010-02-10 12:16:57 UTC (rev 1754)
@@ -124,7 +124,7 @@
this.sourceName = sourceNameParam;
String dialect = params.getProperty(PARAM_DIALECT);
- if (dialect == null)
+ if (dialect == null || DBConstants.DB_DIALECT_AUTO.equalsIgnoreCase(dialect))
{
Connection conn = null;
try
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 12:16:57 UTC (rev 1754)
@@ -132,7 +132,7 @@
/**
* Logger
*/
- private final Log log = ExoLogger.getLogger("jcr.lock.CacheableLockManagerImpl");
+ private final Log LOG = ExoLogger.getLogger("jcr.lock.CacheableLockManagerImpl");
/**
* Data manager.
@@ -245,6 +245,7 @@
// create cache using custom factory
ExoJBossCacheFactory<Serializable, Object> factory =
new ExoJBossCacheFactory<Serializable, Object>(cfm, transactionManager);
+
// configure cache loader parameters with correct DB data-types
configureJDBCCacheLoader(config.getLockManager());
@@ -297,7 +298,14 @@
{
if (jdbcConn != null && !jdbcConn.isClosed())
{
- jdbcConn.close();
+ try
+ {
+ jdbcConn.close();
+ }
+ catch (SQLException e)
+ {
+ throw new RepositoryException("Error of connection close", e);
+ }
}
}
}
@@ -346,7 +354,6 @@
blobType = "long byte";
}
// else GENERIC, DB2 etc
-
// set parameters if not defined
if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, null) == null)
@@ -359,6 +366,10 @@
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
}
}
+ else
+ {
+ LOG.warn("CacheLoader DataSource " + JBOSSCACHE_JDBC_CL_DATASOURCE + " is not configured.");
+ }
}
/**
@@ -371,9 +382,9 @@
List<IndividualCacheLoaderConfig> oldConfigs;
if (config == null || (oldConfigs = config.getIndividualCacheLoaderConfigs()) == null || oldConfigs.isEmpty())
{
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("No cache loader has been defined, thus no need to encapsulate any cache loader.");
+ LOG.info("No cache loader has been defined, thus no need to encapsulate any cache loader.");
}
return;
}
@@ -381,13 +392,13 @@
((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(CacheLoaderManager.class);
if (clm == null)
{
- log.error("The CacheLoaderManager cannot be found");
+ LOG.error("The CacheLoaderManager cannot be found");
return;
}
CacheLoader currentCL = clm.getCacheLoader();
if (currentCL == null)
{
- log.error("The CacheLoader cannot be found");
+ LOG.error("The CacheLoader cannot be found");
return;
}
@@ -406,9 +417,9 @@
newConfig.add(cclConfig);
config.setIndividualCacheLoaderConfigs(newConfig);
- if (log.isInfoEnabled())
+ if (LOG.isInfoEnabled())
{
- log.info("The configured cache loader has been encapsulated successfully");
+ LOG.info("The configured cache loader has been encapsulated successfully");
}
}
@@ -540,7 +551,7 @@
case ExtendedEvent.LOCK :
if (currChangesLog.getSize() < 2)
{
- log.error("Incorrect changes log of type ExtendedEvent.LOCK size=" + currChangesLog.getSize()
+ LOG.error("Incorrect changes log of type ExtendedEvent.LOCK size=" + currChangesLog.getSize()
+ "<2 \n" + currChangesLog.dump());
break;
}
@@ -554,13 +565,13 @@
}
else
{
- log.error("Lock must exist in pending locks.");
+ LOG.error("Lock must exist in pending locks.");
}
break;
case ExtendedEvent.UNLOCK :
if (currChangesLog.getSize() < 2)
{
- log.error("Incorrect changes log of type ExtendedEvent.UNLOCK size=" + currChangesLog.getSize()
+ LOG.error("Incorrect changes log of type ExtendedEvent.UNLOCK size=" + currChangesLog.getSize()
+ "<2 \n" + currChangesLog.dump());
break;
}
@@ -596,7 +607,7 @@
}
catch (IllegalStateException e)
{
- log.error(e.getLocalizedMessage(), e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
@@ -610,7 +621,7 @@
}
catch (LockException e)
{
- log.error(e.getMessage(), e);
+ LOG.error(e.getMessage(), e);
}
}
}
@@ -857,7 +868,7 @@
}
catch (NoSuchAlgorithmException e)
{
- log.error("Can't get instanse of MD5 MessageDigest!", e);
+ LOG.error("Can't get instanse of MD5 MessageDigest!", e);
}
return hash;
}
@@ -1030,15 +1041,15 @@
{
//TODO EXOJCR-412, should be refactored in future.
//Skip property not found in DB, because that lock property was removed in other node of cluster.
- if (log.isDebugEnabled())
+ if (LOG.isDebugEnabled())
{
- log.debug("The propperty was removed in other node of cluster.", e);
+ LOG.debug("The propperty was removed in other node of cluster.", e);
}
}
catch (RepositoryException e)
{
- log.error("Error occur during removing lock" + e.getLocalizedMessage(), e);
+ LOG.error("Error occur during removing lock" + e.getLocalizedMessage(), e);
}
}
@@ -1094,7 +1105,7 @@
}
catch (Exception e)
{
- log.warn("Cannot suspend the current transaction", e);
+ LOG.warn("Cannot suspend the current transaction", e);
}
}
return action.execute(arg);
@@ -1109,7 +1120,7 @@
}
catch (Exception e)
{
- log.warn("Cannot resume the current transaction", e);
+ LOG.warn("Cannot resume the current transaction", e);
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCContainer.java 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCContainer.java 2010-02-10 12:16:57 UTC (rev 1754)
@@ -72,7 +72,7 @@
jdbcConn = dataSource.getConnection();
// if table not exists, create it
// connection is closed by DB initializer
- initDatabase(dataSourceName, jdbcConn, DialectDetecter.detect(jdbcConn.getMetaData()));
+ initDatabase(dataSourceName, jdbcConn);
}
catch (SQLException e)
{
@@ -149,11 +149,10 @@
/**
* Creates table in DB if not present
*
- * @param dialect
* @throws IOException
* @throws DBInitializerException
*/
- protected void initDatabase(String dataSource, Connection jdbcConn, String dialect) throws IOException,
+ protected void initDatabase(String dataSource, Connection jdbcConn) throws IOException,
DBInitializerException
{
DBInitializer dbInitializer = new DBInitializer(dataSource, jdbcConn, "/conf/storage/jcr-lock-jdbc.sql");
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2010-02-10 12:16:57 UTC (rev 1754)
@@ -235,7 +235,7 @@
this.dbSourceName = null;
LOG.info("Connect to JCR database as user '" + this.dbUserName + "'");
- if (pDbDialect == DBConstants.DB_DIALECT_GENERIC)
+ if (pDbDialect == DBConstants.DB_DIALECT_GENERIC || DBConstants.DB_DIALECT_AUTO.equalsIgnoreCase(pDbDialect))
{
// try to detect via JDBC metadata
Connection jdbcConn = null;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java 2010-02-10 12:16:57 UTC (rev 1754)
@@ -148,7 +148,7 @@
DatabaseMetaData dbMetaData = conn.getMetaData();
String dialect = props.getProperty(JDBC_DIALECT_PARAM);
- if (dialect == null)
+ if (dialect == null || DBConstants.DB_DIALECT_AUTO.equalsIgnoreCase(dialect))
{
dialect = DialectDetecter.detect(dbMetaData);
}
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-02-10 12:16:57 UTC (rev 1754)
@@ -175,6 +175,7 @@
<properties-param>
<name>working-conf</name>
<description>working-conf</description>
+ <property name="dialect" value="auto" />
<property name="source-name" value="jdbcjcr"/>
<property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
</properties-param>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 11:55:17 UTC (rev 1753)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 12:16:57 UTC (rev 1754)
@@ -33,6 +33,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -45,6 +46,7 @@
<property name="digest-algo" value="MD5" />
<property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
<property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="jdbc-dialect" value="auto" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -97,6 +99,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr1" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -149,6 +152,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr2" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -203,6 +207,7 @@
class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr3" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -295,6 +300,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -354,6 +360,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr1tck" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -412,6 +419,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr2tck" />
+ <property name="dialect" value="auto" />
<property name="multi-db" value="true" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
14 years, 5 months
exo-jcr SVN: r1753 - jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-10 06:55:17 -0500 (Wed, 10 Feb 2010)
New Revision: 1753
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
Log:
EXOJCR-469 single-db configuration ArjunaTransactionService used
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2010-02-10 10:31:35 UTC (rev 1752)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2010-02-10 11:55:17 UTC (rev 1753)
@@ -171,18 +171,29 @@
<component>
<type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
</component>
+
+ <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.jbosscache.ArjunaTransactionService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <!-- component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>5</value>
+ </value-param>
+ </init-params>
+ </component -->
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>5</value>
- </value-param>
- </init-params>
- </component>
-
<external-component-plugins>
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
<component-plugin>
14 years, 5 months
exo-jcr SVN: r1752 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: storage/jdbc and 1 other directory.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-10 05:31:35 -0500 (Wed, 10 Feb 2010)
New Revision: 1752
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
Log:
EXOJCR-470
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 10:05:55 UTC (rev 1751)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10 10:31:35 UTC (rev 1752)
@@ -69,6 +69,8 @@
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import java.sql.Connection;
+import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -280,12 +282,30 @@
try
{
DataSource dataSource = (DataSource)new InitialContext().lookup(dataSourceName);
- dialect = DialectDetecter.detect(dataSource);
+ if (dataSource == null)
+ {
+ throw new RepositoryException("DataSource (" + dataSourceName + ") can't be null");
+ }
+
+ Connection jdbcConn = null;
+ try
+ {
+ jdbcConn = dataSource.getConnection();
+ dialect = DialectDetecter.detect(jdbcConn.getMetaData());
+ }
+ finally
+ {
+ if (jdbcConn != null && !jdbcConn.isClosed())
+ {
+ jdbcConn.close();
+ }
+ }
}
catch (Exception e)
{
throw new RepositoryException("Error configuring JDBC cache loader", e);
}
+
// default values, will be overridden with types suitable for concrete data base.
String blobType = "BLOB";
String charType = "VARCHAR(512)";
@@ -325,12 +345,8 @@
{
blobType = "long byte";
}
- // GENERIC or DB2
- else
- {
- charType = "VARCHAR(512)";
- blobType = "BLOB";
- }
+ // else GENERIC, DB2 etc
+
// set parameters if not defined
if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, null) == null)
@@ -342,7 +358,6 @@
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
}
-
}
}
@@ -362,7 +377,8 @@
}
return;
}
- CacheLoaderManager clm = ((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(CacheLoaderManager.class);
+ CacheLoaderManager clm =
+ ((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(CacheLoaderManager.class);
if (clm == null)
{
log.error("The CacheLoaderManager cannot be found");
@@ -374,7 +390,7 @@
log.error("The CacheLoader cannot be found");
return;
}
-
+
ControllerCacheLoader ccl = new ControllerCacheLoader(currentCL);
List<IndividualCacheLoaderConfig> newConfig = new ArrayList<IndividualCacheLoaderConfig>(1);
// create CacheLoaderConfig
@@ -386,7 +402,7 @@
cclConfig.setAsync(false);
cclConfig.setIgnoreModifications(false);
CacheLoaderConfig.IndividualCacheLoaderConfig first = config.getFirstCacheLoaderConfig();
- cclConfig.setPurgeOnStartup(first != null && first.isPurgeOnStartup());
+ cclConfig.setPurgeOnStartup(first != null && first.isPurgeOnStartup());
newConfig.add(cclConfig);
config.setIndividualCacheLoaderConfigs(newConfig);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2010-02-10 10:05:55 UTC (rev 1751)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2010-02-10 10:31:35 UTC (rev 1752)
@@ -253,6 +253,10 @@
// Dialects
/**
+ * DB_DIALECT_AUTO.
+ */
+ public final static String DB_DIALECT_AUTO = "Auto".intern();
+ /**
* DB_DIALECT_GENERIC.
*/
public final static String DB_DIALECT_GENERIC = "Generic".intern();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2010-02-10 10:05:55 UTC (rev 1751)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2010-02-10 10:31:35 UTC (rev 1752)
@@ -128,35 +128,4 @@
return DBConstants.DB_DIALECT_GENERIC;
}
-
- /**
- * Tries to detect dialect of DataSource
- *
- * @param dataSourceName
- * @return
- * @throws RepositoryException
- */
- public static String detect(DataSource dataSource) throws SQLException
- {
- // if no datasource provided
- if (dataSource == null)
- {
- throw new SQLException("DataSource can't be null");
- }
- // try to detect dialect
- Connection jdbcConn = null;
- try
- {
- jdbcConn = dataSource.getConnection();
- return detect(jdbcConn.getMetaData());
- }
- finally
- {
- if (jdbcConn != null && !jdbcConn.isClosed())
- {
- jdbcConn.close();
- }
- }
-
- }
}
14 years, 5 months
exo-jcr SVN: r1751 - jcr/trunk/exo.jcr.framework.command/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-02-10 05:05:55 -0500 (Wed, 10 Feb 2010)
New Revision: 1751
Modified:
jcr/trunk/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml
Log:
EXOJCR-488: COMMAND .JDBCWorkspaceDataContainer changed to .optimisation.CQJDBCWorkspaceDataContainer
Modified: jcr/trunk/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml 2010-02-10 10:04:50 UTC (rev 1750)
+++ jcr/trunk/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml 2010-02-10 10:05:55 UTC (rev 1751)
@@ -27,7 +27,7 @@
<workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
<property name="multi-db" value="true" />
@@ -48,4 +48,4 @@
</workspaces>
</repository>
</repositories>
-</repository-service>
+</repository-service>
14 years, 5 months
exo-jcr SVN: r1750 - jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-02-10 05:04:50 -0500 (Wed, 10 Feb 2010)
New Revision: 1750
Modified:
jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-488: WEBDAV .JDBCWorkspaceDataContainer changed to .optimisation.CQJDBCWorkspaceDataContainer
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 10:04:10 UTC (rev 1749)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 10:04:50 UTC (rev 1750)
@@ -1,150 +1,150 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
--->
-<repository-service default-repository="db1">
- <repositories>
- <repository name="db1" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="hsqldb" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="jdbc-dialect" value="hsqldb" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws" />
- </properties>
- </query-handler>
- <lock-manager>
- <time-out>15m</time-out>
- <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
- <properties>
- <property name="path" value="target/temp/lock" />
- </properties>
- </persister>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1" />
- <property name="dialect" value="hsqldb" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws1" />
- </properties>
- </query-handler>
- </workspace>
-
- <workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr2" />
- <property name="dialect" value="hsqldb" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2" />
- </properties>
- <value-storages>
- <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws2" />
- </properties>
- </query-handler>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<repository-service default-repository="db1">
+ <repositories>
+ <repository name="db1" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="hsqldb" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="jdbc-dialect" value="hsqldb" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <properties>
+ <property name="max-size" value="2k" />
+ <property name="live-time" value="20m" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager>
+ <time-out>15m</time-out>
+ <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
+ <properties>
+ <property name="path" value="target/temp/lock" />
+ </properties>
+ </persister>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1" />
+ <property name="dialect" value="hsqldb" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <properties>
+ <property name="max-size" value="2k" />
+ <property name="live-time" value="20m" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws1" />
+ </properties>
+ </query-handler>
+ </workspace>
+
+ <workspace name="ws2">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr2" />
+ <property name="dialect" value="hsqldb" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <properties>
+ <property name="max-size" value="2k" />
+ <property name="live-time" value="20m" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws2" />
+ </properties>
+ </query-handler>
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
14 years, 5 months
exo-jcr SVN: r1749 - jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-02-10 05:04:10 -0500 (Wed, 10 Feb 2010)
New Revision: 1749
Modified:
jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-488: FTP .JDBCWorkspaceDataContainer changed to .optimisation.CQJDBCWorkspaceDataContainer
Modified: jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 10:02:16 UTC (rev 1748)
+++ jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-10 10:04:10 UTC (rev 1749)
@@ -27,7 +27,7 @@
<workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="sourceName" value="jdbcjcr" />
<property name="dialect" value="generic" />
14 years, 5 months