exo-jcr SVN: r1647 - ws/trunk/exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2010-02-03 11:10:03 -0500 (Wed, 03 Feb 2010)
New Revision: 1647
Modified:
ws/trunk/exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java
Log:
Modified: ws/trunk/exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java
===================================================================
--- ws/trunk/exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java 2010-02-03 16:08:54 UTC (rev 1646)
+++ ws/trunk/exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java 2010-02-03 16:10:03 UTC (rev 1647)
@@ -19,6 +19,9 @@
package org.exoplatform.ws.frameworks.servlet;
import org.exoplatform.container.StandaloneContainer;
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
import java.net.MalformedURLException;
@@ -49,8 +52,13 @@
/**
* org.exoplatform.container.standalone.config
*/
+
+ private static final Log log = ExoLogger.getLogger(StandaloneContainerInitializedListener.class);
+
private static final String CONF_URL_PARAMETER = "org.exoplatform.container.standalone.config";
+ private static final String PREFIX_WAR = "war:";
+
/**
* Container.
*/
@@ -62,12 +70,27 @@
public void contextInitialized(ServletContextEvent event)
{
String configurationURL = event.getServletContext().getInitParameter(CONF_URL_PARAMETER);
+
try
{
+ if (configurationURL != null && configurationURL.startsWith(PREFIX_WAR))
+ {
+ configurationURL =
+ event.getServletContext().getResource(configurationURL.substring(PREFIX_WAR.length())).toExternalForm();
+ }
+ }
+ catch (Exception e)
+ {
+ log.warn(e.getMessage());
+ }
+
+ try
+ {
StandaloneContainer.addConfigurationURL(configurationURL);
}
- catch (MalformedURLException e1)
+ catch (MalformedURLException e)
{
+ log.warn(e.getMessage());
}
try
@@ -85,7 +108,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ log.warn(e.getMessage());
}
}
14 years, 7 months
exo-jcr SVN: r1646 - jcr/trunk/applications.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-03 11:08:54 -0500 (Wed, 03 Feb 2010)
New Revision: 1646
Modified:
jcr/trunk/applications/Readme.txt
Log:
EXOJCR-407 samples readme
Modified: jcr/trunk/applications/Readme.txt
===================================================================
--- jcr/trunk/applications/Readme.txt 2010-02-03 13:27:35 UTC (rev 1645)
+++ jcr/trunk/applications/Readme.txt 2010-02-03 16:08:54 UTC (rev 1646)
@@ -3,7 +3,7 @@
1. Make sure you have correct:
1.1. settings.xml. There should be the correct application server version (e.g <exo.projects.app.tomcat.version>) etc.
1.2. exo directory structure.
-1.3. Maven version 2.0.8 (or higher).
+1.3. Maven version 2.2.1 (or higher).
1.4. Make sure you have run mvn insctal within ./config folder.
2. Run "mvn -f product-exo-jcr-as-tomcat6.xml clean install antrun:run" command.
3. If the command has executed successfully, go to exo-tomcat and run "eXo run" command.
14 years, 7 months
exo-jcr SVN: r1645 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-02-03 08:27:35 -0500 (Wed, 03 Feb 2010)
New Revision: 1645
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
Log:
EXOJCR-419 : fix
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-02-03 13:13:03 UTC (rev 1644)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-02-03 13:27:35 UTC (rev 1645)
@@ -23,6 +23,7 @@
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.SimpleParameterEntry;
import org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex;
+import org.exoplatform.services.jcr.util.StringNumberParser;
import java.io.IOException;
@@ -53,7 +54,6 @@
*/
public void init(QueryHandlerEntry queryHandlerEntry) throws IOException, RepositoryConfigurationException
{
- // TODO: support human-readable values ( https://jira.jboss.org/jira/browse/EXOJCR-419 )
for (SimpleParameterEntry parameter : queryHandlerEntry.getParameters())
{
setParam(parameter.getName(), parameter.getValue());
@@ -68,59 +68,113 @@
{
if (QueryHandlerParams.PARAM_AUTO_REPAIR.equals(name))
+ {
searchIndex.setAutoRepair(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_BUFFER_SIZE.equals(name))
- searchIndex.setBufferSize(Integer.parseInt(value));
+ {
+ searchIndex.setBufferSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_CACHE_SIZE.equals(name))
- searchIndex.setCacheSize(Integer.parseInt(value));
+ {
+ searchIndex.setCacheSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_CONSISTENCY_CHECK_ENABLED.equals(name))
+ {
searchIndex.setEnableConsistencyCheck(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_DOCUMENT_ORDER.equals(name))
+ {
searchIndex.setRespectDocumentOrder(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_EXCERPTPROVIDER_CLASS.equals(name))
+ {
searchIndex.setExcerptProviderClass(value);
+ }
else if (QueryHandlerParams.PARAM_EXTRACTOR_BACKLOG.equals(name))
- searchIndex.setExtractorBackLogSize(Integer.parseInt(value));
+ {
+ searchIndex.setExtractorBackLogSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_EXTRACTOR_POOLSIZE.equals(name))
- searchIndex.setExtractorPoolSize(Integer.parseInt(value));
+ {
+ searchIndex.setExtractorPoolSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_EXTRACTOR_TIMEOUT.equals(name))
- searchIndex.setExtractorTimeout(Long.parseLong(value));
+ {
+ searchIndex.setExtractorTimeout(StringNumberParser.parseLong(value));
+ }
else if (QueryHandlerParams.PARAM_FORCE_CONSISTENCYCHECK.equals(name))
+ {
searchIndex.setForceConsistencyCheck(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_ERRORLOG_SIZE.equals(name))
- searchIndex.setErrorLogfileSize(Integer.parseInt(value));
+ {
+ searchIndex.setErrorLogfileSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_PATH.equals(name))
+ {
searchIndex.setIndexingConfiguration(value);
+ }
else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_CLASS.equals(name))
+ {
searchIndex.setIndexingConfigurationClass(value);
+ }
else if (QueryHandlerParams.PARAM_MAX_FIELD_LENGTH.equals(name))
- searchIndex.setMaxFieldLength(Integer.parseInt(value));
+ {
+ searchIndex.setMaxFieldLength(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_MAX_MERGE_DOCS.equals(name))
- searchIndex.setMaxMergeDocs(Integer.parseInt(value));
+ {
+ searchIndex.setMaxMergeDocs(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_MERGE_FACTOR.equals(name))
- searchIndex.setMergeFactor(Integer.parseInt(value));
+ {
+ searchIndex.setMergeFactor(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_MIN_MERGE_DOCS.equals(name))
- searchIndex.setMinMergeDocs(Integer.parseInt(value));
+ {
+ searchIndex.setMinMergeDocs(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_QUERY_CLASS.equals(name))
+ {
searchIndex.setQueryClass(value);
+ }
else if (QueryHandlerParams.PARAM_RESULT_FETCH_SIZE.equals(name))
- searchIndex.setResultFetchSize(Integer.parseInt(value));
+ {
+ searchIndex.setResultFetchSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_SPELLCHECKER_CLASS.equals(name))
+ {
searchIndex.setSpellCheckerClass(value);
+ }
else if (QueryHandlerParams.PARAM_SUPPORT_HIGHLIGHTING.equals(name))
+ {
searchIndex.setSupportHighlighting(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CLASS.equals(name))
+ {
searchIndex.setSynonymProviderClass(value);
+ }
else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CONFIG_PATH.equals(name))
+ {
searchIndex.setSynonymProviderConfigPath(value);
+ }
else if (QueryHandlerParams.PARAM_USE_COMPOUNDFILE.equals(name))
+ {
searchIndex.setUseCompoundFile(Boolean.parseBoolean(value));
+ }
else if (QueryHandlerParams.PARAM_VOLATILE_IDLE_TIME.equals(name))
- searchIndex.setVolatileIdleTime(Integer.parseInt(value));
+ {
+ searchIndex.setVolatileIdleTime(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_MAX_VOLATILE_SIZE.equals(name))
- searchIndex.setMaxVolatileIndexSize(Integer.parseInt(value));
+ {
+ searchIndex.setMaxVolatileIndexSize(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_MAX_VOLATILE_TIME.equals(name))
- searchIndex.setMaxVolatileTime(Integer.parseInt(value));
+ {
+ searchIndex.setMaxVolatileTime(StringNumberParser.parseInt(value));
+ }
else if (QueryHandlerParams.PARAM_ANALYZER_CLASS.equals(name))
{
searchIndex.setAnalyzer(value);
14 years, 7 months
exo-jcr SVN: r1644 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-03 08:13:03 -0500 (Wed, 03 Feb 2010)
New Revision: 1644
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java
Log:
BaseClusteringFunctionalTest updated to use 1 connection per request
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java 2010-02-03 10:34:00 UTC (rev 1643)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java 2010-02-03 13:13:03 UTC (rev 1644)
@@ -59,7 +59,7 @@
{
super.setUp();
- JCRWebdavConnection[] connections =
+ connections =
new JCRWebdavConnection[]{new JCRWebdavConnection("localhost", 8080, "root", "exo", realm, workspacePath)
/**,
new JCRWebdavConnection("localhost", 8082, "root", "exo", realm, workspacePath),
14 years, 7 months
exo-jcr SVN: r1643 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-03 05:34:00 -0500 (Wed, 03 Feb 2010)
New Revision: 1643
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java
Log:
BaseClusteringFunctionalTest updated to use 1 connection per request
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java 2010-02-03 10:24:32 UTC (rev 1642)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/BaseClusteringFunctionalTest.java 2010-02-03 10:34:00 UTC (rev 1643)
@@ -41,20 +41,14 @@
* @author <a href="mailto:alex.reshetnyak@exoplatform.com.ua">Alex Reshetnyak</a>
* @version $Id$
*/
-public abstract class BaseClusteringFunctionalTest
- extends TestCase
+public abstract class BaseClusteringFunctionalTest extends TestCase
{
private String realm = "eXo REST services";
private String workspacePath = "/rest/jcr/repository/production/";
- private JCRWebdavConnection[] connections = new JCRWebdavConnection[]
- {new JCRWebdavConnection("localhost", 8080, "root", "exo", realm, workspacePath)/*,
- new JCRWebdavConnection("localhost", 8082, "root", "exo", realm, workspacePath),
- new JCRWebdavConnection("localhost", 8083, "root", "exo", realm, workspacePath),
- new JCRWebdavConnection("localhost", 8084, "root", "exo", realm, workspacePath)*/
- };
+ private JCRWebdavConnection[] connections;
protected String nodeName;
@@ -65,6 +59,15 @@
{
super.setUp();
+ JCRWebdavConnection[] connections =
+ new JCRWebdavConnection[]{new JCRWebdavConnection("localhost", 8080, "root", "exo", realm, workspacePath)
+ /**,
+ new JCRWebdavConnection("localhost", 8082, "root", "exo", realm, workspacePath),
+ new JCRWebdavConnection("localhost", 8083, "root", "exo", realm, workspacePath),
+ new JCRWebdavConnection("localhost", 8084, "root", "exo", realm, workspacePath)
+ */
+ };
+
nodeName = generateUniqueName("removed_node_over_webdav");
}
@@ -91,7 +94,7 @@
protected JCRWebdavConnection getConnection()
{
- return connections[(int) (Math.random() * 100) % connections.length];
+ return connections[(int)(Math.random() * 100) % connections.length];
}
/**
@@ -122,7 +125,7 @@
}
protected String getPropertyValue(byte[] responseData, String propertyName) throws XMLStreamException,
- FactoryConfigurationError, IOException
+ FactoryConfigurationError, IOException
{
InputStream input = new ByteArrayInputStream(responseData);
14 years, 7 months
exo-jcr SVN: r1642 - jcr/trunk/exo.jcr.component.core.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-03 05:24:32 -0500 (Wed, 03 Feb 2010)
New Revision: 1642
Modified:
jcr/trunk/exo.jcr.component.core/pom.xml
Log:
EXOJCR-403 jdbc deps fix for tests scope
Modified: jcr/trunk/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/pom.xml 2010-02-03 10:14:00 UTC (rev 1641)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2010-02-03 10:24:32 UTC (rev 1642)
@@ -214,9 +214,15 @@
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
+ <version>8.3-603.jdbc3</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
<version>8.2-504.jdbc3</version>
<scope>test</scope>
- </dependency>
+ </dependency -->
<!-- For Oracle 10g support (local-jcr repository) -->
<!-- dependency>
<groupId>ojdbc</groupId>
@@ -244,12 +250,12 @@
<scope>test</scope>
</dependency -->
<!-- For MS SQL 7/2000/2005 and Sybase ASE/Anywhere support (jTDS driver) -->
- <dependency>
+ <!-- dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2</version>
<scope>test</scope>
- </dependency>
+ </dependency -->
<!-- For MS SQL 2005 support (Microsoft JDBC driver) (local-jcr repository) -->
<!-- dependency>
<groupId>com.microsoft.sqlserver</groupId>
@@ -257,14 +263,20 @@
<version>9.0</version>
<scope>test</scope>
</dependency -->
+ <!-- dependency>
+ <groupId>com.microsoft</groupId>
+ <artifactId>sqljdbc</artifactId>
+ <version>2.0</version>
+ <scope>test</scope>
+ </dependency -->
<!-- For Apache Derby support (aka JavaDB) -->
- <dependency>
+ <!-- dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.2.2.0</version>
<scope>test</scope>
- </dependency>
- <!-- H2 Database -->
+ </dependency -->
+ <!-- H2 Database (not supported now) -->
<!-- dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -562,7 +574,7 @@
<configuration>
<phase>test</phase>
<forkMode>${exo.test.forkMode}</forkMode>
- <argLine>${env.MAVEN_OPTS}</argLine>
+ <!-- argLine>${env.MAVEN_OPTS}</argLine -->
<goals>
<goal>test</goal>
</goals>
@@ -579,7 +591,7 @@
<include>**/**/TestJBossCacheWorkspaceStorageCache_.java</include>
<include>**/**/TestSVNodeDataOptimization_.java</include>
- <include>**/**/ExportWorkspaceSystemViewTest.java</include>
+ <include>**/**/TestValueConstraints.java</include>
</includes>
</configuration>
</plugin>
14 years, 7 months
exo-jcr SVN: r1641 - 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-03 05:14:00 -0500 (Wed, 03 Feb 2010)
New Revision: 1641
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
Log:
EXOJCR-221 todo for SessionDataManager
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-02-03 10:09:14 UTC (rev 1640)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-02-03 10:14:00 UTC (rev 1641)
@@ -1346,6 +1346,7 @@
throws RepositoryException
{
// simple locate now
+ // TODO list copy?
List<PropertyData> persisted = transactionableManager.getReferencesData(identifier, skipVersionStorage);
List<PropertyData> sessionTransient = new ArrayList<PropertyData>();
for (PropertyData p : persisted)
14 years, 7 months
exo-jcr SVN: r1640 - in jcr/trunk/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/storage/jdbc and 5 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-03 05:09:14 -0500 (Wed, 03 Feb 2010)
New Revision: 1640
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OracleConnectionFactory.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OraclePoolConnectionFactory.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OracleConnectionFactory.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OraclePoolConnectionFactory.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCConnectionTestBase.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestMultiDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestSingleDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestRemoveFromValueStorage.java
Log:
EXOJCR-403 WPDM use conn.close instead of rollback on for-read connection (SNS check); code format; reorg tests for JDBC container testing
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -570,7 +570,7 @@
}
finally
{
- acon.rollback();
+ acon.close();
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -268,7 +268,11 @@
checkIfOpened();
try
{
- dbConnection.rollback();
+ if (!this.readOnly)
+ {
+ dbConnection.rollback();
+ }
+
dbConnection.close();
// rollback from the end
@@ -321,14 +325,19 @@
checkIfOpened();
try
{
- dbConnection.commit();
+ if (!this.readOnly)
+ {
+ dbConnection.commit();
+ }
+
dbConnection.close();
try
{
for (ValueIOChannel vo : valueChanges)
+ {
vo.commit();
-
+ }
}
catch (IOException e)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OracleConnectionFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OracleConnectionFactory.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OracleConnectionFactory.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -177,8 +177,11 @@
{
Connection conn = getCachedConnection();
- if (readOnly) // set this feature only if it asked
+ if (readOnly)
+ {
+ // set this feature only if it asked
conn.setReadOnly(true);
+ }
return conn;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OraclePoolConnectionFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OraclePoolConnectionFactory.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/OraclePoolConnectionFactory.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -163,8 +163,11 @@
{
Connection conn = getPoolConnection();
- if (readOnly) // set this feature only if it asked
+ if (readOnly)
+ {
+ // set this feature only if it asked
conn.setReadOnly(true);
+ }
return conn;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OracleConnectionFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OracleConnectionFactory.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OracleConnectionFactory.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -177,8 +177,11 @@
{
Connection conn = getCachedConnection();
- if (readOnly) // set this feature only if it asked
+ if (readOnly)
+ {
+ // set this feature only if it asked
conn.setReadOnly(true);
+ }
return conn;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OraclePoolConnectionFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OraclePoolConnectionFactory.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/OraclePoolConnectionFactory.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -163,8 +163,11 @@
{
Connection conn = getPoolConnection();
- if (readOnly) // set this feature only if it asked
+ if (readOnly)
+ {
+ // set this feature only if it asked
conn.setReadOnly(true);
+ }
return conn;
}
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCConnectionTestBase.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCConnectionTestBase.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCConnectionTestBase.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -47,13 +47,6 @@
private Connection connect = null;
- public void setUp(String scriptPath, boolean multiDB) throws Exception
- {
-
- super.setUp();
- new DBInitializer("ws3", getJNDIConnection(), scriptPath, multiDB).init();
- }
-
protected void tearDown() throws Exception
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestMultiDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestMultiDbJDBCConnection.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestMultiDbJDBCConnection.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -17,6 +17,7 @@
package org.exoplatform.services.jcr.impl.storage.jdbc.db;
import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCConnectionTestBase;
+import org.exoplatform.services.jcr.impl.storage.jdbc.init.DBInitializer;
import java.sql.SQLException;
import java.sql.Statement;
@@ -32,13 +33,16 @@
public class TestMultiDbJDBCConnection extends JDBCConnectionTestBase
{
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.BaseStandaloneTest#setUp()
- */
+ private void setUp(String scriptPath, boolean multiDB) throws Exception
+ {
+ super.setUp();
+ new DBInitializer("ws3", getJNDIConnection(), scriptPath, multiDB).init();
+ }
+
@Override
public void setUp() throws Exception
{
- super.setUp("/conf/storage/jcr-mjdbc.sql", true);
+ setUp("/conf/storage/jcr-mjdbc.sql", true);
try
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestSingleDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestSingleDbJDBCConnection.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/TestSingleDbJDBCConnection.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -17,6 +17,7 @@
package org.exoplatform.services.jcr.impl.storage.jdbc.db;
import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCConnectionTestBase;
+import org.exoplatform.services.jcr.impl.storage.jdbc.init.DBInitializer;
import java.sql.SQLException;
import java.sql.Statement;
@@ -32,16 +33,18 @@
public class TestSingleDbJDBCConnection extends JDBCConnectionTestBase
{
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.BaseStandaloneTest#setUp()
- */
+ private void setUp(String scriptPath, boolean multiDB) throws Exception
+ {
+ super.setUp();
+ new DBInitializer("ws3", getJNDIConnection(), scriptPath, multiDB).init();
+ }
+
@Override
public void setUp() throws Exception
{
- super.setUp("/conf/storage/jcr-sjdbc.sql", false);
+ setUp("/conf/storage/jcr-sjdbc.sql", false);
try
{
-
Statement st = getJNDIConnection().createStatement();
st.executeUpdate("insert into JCR_SITEM values" + "('A','A','test1',20090525,'ws3',2,1233,1,10,5)");
st.executeUpdate("insert into JCR_SITEM values" + "('B','A','test2',20090625,'ws3',1,1233,5,10,4)");
@@ -56,7 +59,6 @@
st.close();
jdbcConn = new SingleDbJDBCConnection(getJNDIConnection(), false, "ws3", null, 10, null, null);
tableType = "S";
-
}
catch (SQLException se)
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestRemoveFromValueStorage.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestRemoveFromValueStorage.java 2010-02-03 10:01:42 UTC (rev 1639)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestRemoveFromValueStorage.java 2010-02-03 10:09:14 UTC (rev 1640)
@@ -60,9 +60,9 @@
private int smallValueSize = 1000 * 1024;
- private SessionImpl my_session;
+ private SessionImpl mySession;
- private Node my_root;
+ private Node myRoot;
@Override
public void setUp() throws Exception
@@ -70,11 +70,11 @@
super.setUp();
// This test uses special workspace ("ws3"), with complex value storage. So
// we need to login into another workspace.
- my_session = (SessionImpl)repository.login(credentials, "ws3");
- my_root = my_session.getRootNode();
+ mySession = (SessionImpl)repository.login(credentials, "ws3");
+ myRoot = mySession.getRootNode();
// creating property with binary values.
- testRoot = my_root.addNode("TestRoot");
+ testRoot = myRoot.addNode("TestRoot");
values = new Value[largeCount + smallCount];
@@ -98,6 +98,7 @@
generator.nextBytes(smallValue);
values[i] = testRoot.getSession().getValueFactory().createValue(new ByteArrayInputStream(smallValue));
}
+
if (values.length == 1)
{
prop = testRoot.setProperty("binaryProperty", values[0]);
@@ -106,7 +107,7 @@
{
prop = testRoot.setProperty("binaryProperty", values);
}
- my_session.save();
+ mySession.save();
}
public void testRemoveValue() throws Exception
@@ -114,7 +115,7 @@
// reading values directly from value storage
PropertyImpl propertyImpl = (PropertyImpl)prop;
ValueStoragePluginProvider storageProvider =
- (ValueStoragePluginProvider)my_session.getContainer().getComponentInstanceOfType(
+ (ValueStoragePluginProvider)mySession.getContainer().getComponentInstanceOfType(
ValueStoragePluginProvider.class);
String propertyId = propertyImpl.getInternalIdentifier();
@@ -143,7 +144,7 @@
}
prop.remove();
- my_session.save();
+ mySession.save();
// checking whether values are still in value storage.
for (int i = 0; i < count; i++)
@@ -170,10 +171,10 @@
@Override
protected void tearDown() throws Exception
{
- if (my_session != null)
+ if (mySession != null)
{
testRoot.remove();
- my_session.logout();
+ mySession.logout();
}
super.tearDown();
}
14 years, 7 months
exo-jcr SVN: r1639 - jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-03 05:01:42 -0500 (Wed, 03 Feb 2010)
New Revision: 1639
Modified:
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.sybase.sql
Log:
EXOJCR-403 remove comment on sybase mjdbc create sql
Modified: jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.sybase.sql
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.sybase.sql 2010-02-03 09:11:25 UTC (rev 1638)
+++ jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.sybase.sql 2010-02-03 10:01:42 UTC (rev 1639)
@@ -1,43 +1,3 @@
-/* --Before database will be created we have to create 'disk' with enough amount of free space
-use master
-go
-
-disk init name = 'EXOJCR',
-physname = '/opt/Sybase/ASELE/data/exojcr',
-size = '400M',
-cntrltype = 0
-go
-
-sp_deviceattr 'EXOJCR', dsync, true
-go
-
--- Creating database 'portal', 'jcr', 'jcr2'
-use master
-go
-
-create database portal on EXOJCR
-go
-create database jcr on EXOJCR
-go
-create database jcr2 on EXOJCR
-go
-
--- Enable indexes in database turning on 'select into' option
-use master
-go
-sp_dboption portal, 'select into', true
-go
-sp_dboption jcr, 'select into', true
-go
-sp_dboption jcr2, 'select into', true
-go
-
--- NOTE: User creating tables we must have a DBO rights for the target database
--- NOTE: Index maximum length is 600 bytes
--- NOTE: VARBINARY storage size is the actual size of the data values entered, not the column length.
--- NOTE: set number of user connection according your pool configuration: sp_configure "number of user connection", 200
-*/
-
CREATE TABLE JCR_MCONTAINER(
VERSION VARCHAR(96) NOT NULL,
CONSTRAINT JCR_PK_MCONTAINER PRIMARY KEY(VERSION)
14 years, 7 months