exo-jcr SVN: r2067 - ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-03-15 09:24:16 -0400 (Mon, 15 Mar 2010)
New Revision: 2067
Modified:
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
Log:
EXOJCR-567 ClientAbortException is now caught using full class name 'org.apache.catalina.connector.ClientAbortException'
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java 2010-03-15 12:04:18 UTC (rev 2066)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java 2010-03-15 13:24:16 UTC (rev 2067)
@@ -82,10 +82,16 @@
ContainerResponse response = new ContainerResponse(new ServletContainerResponseWriter(httpResponse));
requestHandler.handleRequest(request, response);
}
- catch (SocketException se)
+ catch (IOException ioe)
{
- if (LOG.isDebugEnabled())
- LOG.debug("Write socket error!", se);
+ if (ioe.getCause().getClass().getName().equals("org.apache.catalina.connector.ClientAbortException"))
+ {
+ LOG.debug("Write socket error!", ioe);
+ }
+ else
+ {
+ throw new ServletException(ioe);
+ }
}
catch (Exception e)
{
16 years, 2 months
exo-jcr SVN: r2066 - in core/trunk/exo.core.component.database/src: test/java/org/exoplatform/services/database/creator and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-03-15 08:04:18 -0400 (Mon, 15 Mar 2010)
New Revision: 2066
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java
core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java
core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-573: DBCreator impl
Modified: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java 2010-03-15 11:40:34 UTC (rev 2065)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java 2010-03-15 12:04:18 UTC (rev 2066)
@@ -40,5 +40,4 @@
{
super(message, e);
}
-
}
Modified: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java 2010-03-15 11:40:34 UTC (rev 2065)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java 2010-03-15 12:04:18 UTC (rev 2066)
@@ -41,19 +41,14 @@
public static final String PASSWORD_TEMPLATE = "${password}";
/**
- * Create database using predefined SQL DDL script for specific user and password.
- * Database name, user name and password defined in script via templates as
- * ${database}, ${username} and ${password} respectively.
+ * Create database using predefined SQL DDL script for new user which are given via configuration.
+ * New database name, user name and password defined in script via templates as ${database}, ${username}
+ * and ${password} respectively.
*
* @param dbName
- * database name
- * @param userName
- * user name
- * @param password
- * user's password
- *
+ * new database name
* @throws DBCreationException
* if any error occurs
*/
- void create(String dbName, String userName, String password) throws DBCreationException;
+ void create(String dbName) throws DBCreationException;
}
Modified: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java 2010-03-15 11:40:34 UTC (rev 2065)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java 2010-03-15 12:04:18 UTC (rev 2066)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.database.creator;
+import org.exoplatform.container.configuration.ConfigurationException;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.PropertiesParam;
@@ -35,53 +36,123 @@
*/
public class DBCreatorImpl implements DBCreator
{
- private static final String DB_CREATOR_PROPERTIES = "db-creator-properties";
+ public static final String SQL_DELIMITER = ";";
+ public static final String SQL_DELIMITER_COMMENT_PREFIX = "/*$DELIMITER:";
+
+ private static final String DB_CONNECTION_PROPERTIES = "db-connection";
+
+ private static final String DB_CREATION_PROPERTIES = "db-creation";
+
private static final String DRIVER_PROPERTY = "driverClassName";
private static final String URL_PROPERTY = "url";
+ private static final String SCRIPT_PATH_PROPERTY = "scriptPath";
+
private static final String USERNAME_PROPERTY = "username";
private static final String PASSWORD_PROPERTY = "password";
- private static final String SCRIPT_PROPERTY = "script";
+ /**
+ * Driver class name.
+ */
+ protected final String driver;
- // TODO javaDoc
- private final String driver;
+ /**
+ * Database url.
+ */
+ protected final String url;
- private final String url;
+ /**
+ * SA user name.
+ */
+ protected final String userName;
- private final String userName;
+ /**
+ * SA user's password.
+ */
+ protected final String password;
- private final String password;
+ /**
+ * DB script creation.
+ */
+ protected final String dbScript;
- private final String script;
+ /**
+ * User name for new DB.
+ */
+ protected final String dbUserName;
/**
+ * User's password.
+ */
+ protected final String dbPassword;
+
+ /**
* DBCreatorImpl constructor.
*
* @param contextInit
* Initial context initializer
* @param params
- * Initializations params
+ * Initializations parameters
*/
- public DBCreatorImpl(InitParams params)
+ public DBCreatorImpl(InitParams params) throws ConfigurationException
{
- // TODO null checks
- PropertiesParam prop = params.getPropertiesParam(DB_CREATOR_PROPERTIES);
+ if (params == null)
+ {
+ throw new ConfigurationException("Initializations parameters expected");
+ }
- this.driver = prop.getProperty(DRIVER_PROPERTY);
- this.url = prop.getProperty(URL_PROPERTY);
- this.userName = prop.getProperty(USERNAME_PROPERTY);
- this.password = prop.getProperty(PASSWORD_PROPERTY);
- this.script = prop.getProperty(SCRIPT_PROPERTY);
+ PropertiesParam prop = params.getPropertiesParam(DB_CONNECTION_PROPERTIES);
+
+ if (prop != null)
+ {
+ this.driver = prop.getProperty(DRIVER_PROPERTY);
+ this.url = prop.getProperty(URL_PROPERTY);
+ this.userName = prop.getProperty(USERNAME_PROPERTY);
+ this.password = prop.getProperty(PASSWORD_PROPERTY);
+ }
+ else
+ {
+ throw new ConfigurationException(DB_CONNECTION_PROPERTIES + " expected in initializations parameters");
+ }
+
+ prop = params.getPropertiesParam(DB_CREATION_PROPERTIES);
+
+ if (prop != null)
+ {
+ String scriptPath = prop.getProperty(SCRIPT_PATH_PROPERTY);
+ if (scriptPath != null)
+ {
+ try
+ {
+ dbScript = readScriptResource(scriptPath);
+ }
+ catch (IOException e)
+ {
+ throw new ConfigurationException("Can't read script resource " + scriptPath, e);
+ }
+ }
+ else
+ {
+ throw new ConfigurationException(SCRIPT_PATH_PROPERTY + " expected in initializations parameters");
+ }
+
+ this.dbUserName = prop.getProperty(USERNAME_PROPERTY);
+ this.dbPassword = prop.getProperty(PASSWORD_PROPERTY);
+ }
+ else
+ {
+ throw new ConfigurationException(DB_CREATION_PROPERTIES + " expected in initializations parameters");
+ }
+
}
/**
* {@inheritDoc}
*/
- public void create(String dbName, String _userName, String _password) throws DBCreationException
+ public void create(String dbName) throws DBCreationException
{
Connection conn = null;
try
@@ -98,24 +169,22 @@
throw new DBCreationException("Can't load the JDBC driver " + driver, e);
}
- String sql;
try
{
- sql = readScriptResource(script);
- }
- catch (IOException e)
- {
- throw new DBCreationException("Can't read SQL script resource " + script, e);
- }
+ conn.setAutoCommit(false);
- sql = sql.replace(DBCreator.DATABASE_TEMPLATE, dbName);
- sql = sql.replace(DBCreator.USERNAME_TEMPLATE, _userName);
- sql = sql.replace(DBCreator.PASSWORD_TEMPLATE, _password);
+ for (String scr : dbScript.split(SQL_DELIMITER))
+ {
+ scr = scr.replace(DBCreator.DATABASE_TEMPLATE, dbName);
+ scr = scr.replace(DBCreator.USERNAME_TEMPLATE, dbUserName);
+ scr = scr.replace(DBCreator.PASSWORD_TEMPLATE, dbPassword);
- try
- {
- conn.setAutoCommit(false);
- conn.createStatement().executeUpdate(sql);
+ String s = cleanWhitespaces(scr.trim());
+ if (s.length() > 0)
+ {
+ conn.createStatement().executeUpdate(s);
+ }
+ }
conn.commit();
}
catch (SQLException e)
@@ -126,10 +195,21 @@
}
catch (SQLException e1)
{
- throw new DBCreationException("Can't perform rollback", e);
+ throw new DBCreationException("Can't perform rollback", e1);
}
- throw new DBCreationException("Can't execute SQL script " + sql, e);
+ throw new DBCreationException("Can't execute SQL script", e);
}
+ finally
+ {
+ try
+ {
+ conn.close();
+ }
+ catch (SQLException e)
+ {
+ throw new DBCreationException("Can't close connection", e);
+ }
+ }
}
/**
@@ -137,8 +217,6 @@
*/
protected String readScriptResource(String path) throws IOException
{
- // InputStream is = this.getClass().getResourceAsStream(path);
- // TODO
InputStream is = new FileInputStream(path);
InputStreamReader isr = new InputStreamReader(is);
try
@@ -155,13 +233,27 @@
}
finally
{
- try
+ is.close();
+ }
+ }
+
+ /**
+ * Clean whitespace.
+ */
+ private String cleanWhitespaces(String string)
+ {
+ if (string != null)
+ {
+ char[] cc = string.toCharArray();
+ for (int ci = cc.length - 1; ci > 0; ci--)
{
- is.close();
+ if (Character.isWhitespace(cc[ci]))
+ {
+ cc[ci] = ' ';
+ }
}
- catch (IOException e)
- {
- }
+ return new String(cc);
}
+ return string;
}
}
Modified: core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java
===================================================================
--- core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java 2010-03-15 11:40:34 UTC (rev 2065)
+++ core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java 2010-03-15 12:04:18 UTC (rev 2066)
@@ -54,7 +54,6 @@
public void testCreate() throws Exception
{
- // TODO create DB
- // dbCreator.create("TestDB", "TestUser", "TestPwd");
+ dbCreator.create("portal");
}
}
Modified: core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml 2010-03-15 11:40:34 UTC (rev 2065)
+++ core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml 2010-03-15 12:04:18 UTC (rev 2066)
@@ -52,16 +52,23 @@
<component>
<key>org.exoplatform.services.database.creator.DBCreator</key>
- <type>org.exoplatform.services.database.creator.DBCreatorImpl</type>
+ <type>org.exoplatform.services.database.creator.TesterDBCreator</type>
<init-params>
<properties-param>
- <name>db-creator-properties</name>
+ <name>db-connection</name>
+ <description>database connection properties</description>
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:file:target/temp/data/portal" />
<property name="username" value="sa" />
<property name="password" value="" />
- <property name="script" value="test.sql" />
</properties-param>
+ <properties-param>
+ <name>db-creation</name>
+ <description>properites for new database creation</description>
+ <property name="scriptPath" value="test.sql" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
</init-params>
</component>
16 years, 2 months
exo-jcr SVN: r2065 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-03-15 07:40:34 -0400 (Mon, 15 Mar 2010)
New Revision: 2065
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestOrderBefore.java
Log:
EXOJCR-587 bug reproduced in unit testDeleteOrderBefore()
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestOrderBefore.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestOrderBefore.java 2010-03-12 16:13:36 UTC (rev 2064)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestOrderBefore.java 2010-03-15 11:40:34 UTC (rev 2065)
@@ -965,6 +965,38 @@
}
+ public void testDeleteOrderBefore() throws Exception
+ {
+ Session session = repository.login(credentials, "ws");
+ session.getRootNode().addNode("a");
+ session.save();
+ session.logout();
+
+ session = repository.login(credentials, "ws");
+ Node a = session.getRootNode().getNode("a"); // We suppose it already exist
+ a.addNode("n1");
+ a.addNode("n2");
+ a.addNode("n3");
+ a.addNode("n4");
+ session.save();
+ session.logout();
+
+ session = repository.login(credentials, "ws");
+ a = session.getRootNode().getNode("a");
+ NodeIterator i = a.getNodes();
+ i.nextNode().remove();
+ i.nextNode().remove();
+ i.nextNode().remove();
+ session.save();
+ session.logout();
+
+ session = repository.login(credentials, "ws");
+ a = session.getRootNode().getNode("a");
+ a.addNode("n5");
+ a.orderBefore("n5", null); // NPE happens here
+ session.save();
+ }
+
private EntityCollection getEntityCollection(NodeIterator nodes)
{
List result = new ArrayList();
16 years, 2 months
exo-jcr SVN: r2064 - in core/trunk/exo.core.component.database/src: test/java/org/exoplatform/services/database/creator and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-03-12 11:13:36 -0500 (Fri, 12 Mar 2010)
New Revision: 2064
Added:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java
core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java
Log:
EXOJCR-574: DBCreator
Added: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java (rev 0)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreationException.java 2010-03-12 16:13:36 UTC (rev 2064)
@@ -0,0 +1,44 @@
+/*
+ * 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.database.creator;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: $
+ */
+public class DBCreationException extends Exception
+{
+
+ /**
+ * DBCreationException constructor.
+ */
+ public DBCreationException(Throwable e)
+ {
+ super(e);
+ }
+
+ /**
+ * DBCreationException constructor.
+ */
+ public DBCreationException(String message, Throwable e)
+ {
+ super(message, e);
+ }
+
+}
Added: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java (rev 0)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreator.java 2010-03-12 16:13:36 UTC (rev 2064)
@@ -0,0 +1,59 @@
+/*
+ * 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.database.creator;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: $
+ */
+public interface DBCreator
+{
+
+ /**
+ * Database template.
+ */
+ public static final String DATABASE_TEMPLATE = "${database}";
+
+ /**
+ * User name template.
+ */
+ public static final String USERNAME_TEMPLATE = "${username}";
+
+ /**
+ * Password template.
+ */
+ public static final String PASSWORD_TEMPLATE = "${password}";
+
+ /**
+ * Create database using predefined SQL DDL script for specific user and password.
+ * Database name, user name and password defined in script via templates as
+ * ${database}, ${username} and ${password} respectively.
+ *
+ * @param dbName
+ * database name
+ * @param userName
+ * user name
+ * @param password
+ * user's password
+ *
+ * @throws DBCreationException
+ * if any error occurs
+ */
+ void create(String dbName, String userName, String password) throws DBCreationException;
+}
Added: core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java
===================================================================
--- core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java (rev 0)
+++ core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/DBCreatorImpl.java 2010-03-12 16:13:36 UTC (rev 2064)
@@ -0,0 +1,167 @@
+/*
+ * 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.database.creator;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.PropertiesParam;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: $
+ */
+public class DBCreatorImpl implements DBCreator
+{
+ private static final String DB_CREATOR_PROPERTIES = "db-creator-properties";
+
+ private static final String DRIVER_PROPERTY = "driverClassName";
+
+ private static final String URL_PROPERTY = "url";
+
+ private static final String USERNAME_PROPERTY = "username";
+
+ private static final String PASSWORD_PROPERTY = "password";
+
+ private static final String SCRIPT_PROPERTY = "script";
+
+ // TODO javaDoc
+ private final String driver;
+
+ private final String url;
+
+ private final String userName;
+
+ private final String password;
+
+ private final String script;
+
+ /**
+ * DBCreatorImpl constructor.
+ *
+ * @param contextInit
+ * Initial context initializer
+ * @param params
+ * Initializations params
+ */
+ public DBCreatorImpl(InitParams params)
+ {
+ // TODO null checks
+ PropertiesParam prop = params.getPropertiesParam(DB_CREATOR_PROPERTIES);
+
+ this.driver = prop.getProperty(DRIVER_PROPERTY);
+ this.url = prop.getProperty(URL_PROPERTY);
+ this.userName = prop.getProperty(USERNAME_PROPERTY);
+ this.password = prop.getProperty(PASSWORD_PROPERTY);
+ this.script = prop.getProperty(SCRIPT_PROPERTY);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void create(String dbName, String _userName, String _password) throws DBCreationException
+ {
+ Connection conn = null;
+ try
+ {
+ Class.forName(driver);
+ conn = DriverManager.getConnection(url, userName, password);
+ }
+ catch (SQLException e)
+ {
+ throw new DBCreationException("Can't establish the JDBC connection to database " + url, e);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new DBCreationException("Can't load the JDBC driver " + driver, e);
+ }
+
+ String sql;
+ try
+ {
+ sql = readScriptResource(script);
+ }
+ catch (IOException e)
+ {
+ throw new DBCreationException("Can't read SQL script resource " + script, e);
+ }
+
+ sql = sql.replace(DBCreator.DATABASE_TEMPLATE, dbName);
+ sql = sql.replace(DBCreator.USERNAME_TEMPLATE, _userName);
+ sql = sql.replace(DBCreator.PASSWORD_TEMPLATE, _password);
+
+ try
+ {
+ conn.setAutoCommit(false);
+ conn.createStatement().executeUpdate(sql);
+ conn.commit();
+ }
+ catch (SQLException e)
+ {
+ try
+ {
+ conn.rollback();
+ }
+ catch (SQLException e1)
+ {
+ throw new DBCreationException("Can't perform rollback", e);
+ }
+ throw new DBCreationException("Can't execute SQL script " + sql, e);
+ }
+ }
+
+ /**
+ * Read SQL script from file resource.
+ */
+ protected String readScriptResource(String path) throws IOException
+ {
+ // InputStream is = this.getClass().getResourceAsStream(path);
+ // TODO
+ InputStream is = new FileInputStream(path);
+ InputStreamReader isr = new InputStreamReader(is);
+ try
+ {
+ StringBuilder sbuff = new StringBuilder();
+ char[] buff = new char[is.available()];
+ int r = 0;
+ while ((r = isr.read(buff)) > 0)
+ {
+ sbuff.append(buff, 0, r);
+ }
+
+ return sbuff.toString();
+ }
+ finally
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException e)
+ {
+ }
+ }
+ }
+}
Added: core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java
===================================================================
--- core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java (rev 0)
+++ core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/TestDBCreator.java 2010-03-12 16:13:36 UTC (rev 2064)
@@ -0,0 +1,60 @@
+/*
+ * 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.database.creator;
+
+import org.exoplatform.container.PortalContainer;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: $
+ */
+public class TestDBCreator extends TestCase
+{
+
+ private DBCreator dbCreator;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ PortalContainer container = PortalContainer.getInstance();
+ dbCreator = (DBCreator)container.getComponentInstanceOfType(DBCreator.class);
+
+ assertNotNull(dbCreator);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreate() throws Exception
+ {
+ // TODO create DB
+ // dbCreator.create("TestDB", "TestUser", "TestPwd");
+ }
+}
16 years, 2 months
exo-jcr SVN: r2063 - in core/trunk/exo.core.component.database/src: test/java/org/exoplatform/services/database and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-03-12 11:12:31 -0500 (Fri, 12 Mar 2010)
New Revision: 2063
Added:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/creator/
core/trunk/exo.core.component.database/src/test/java/org/exoplatform/services/database/creator/
Modified:
core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-574: DBCreator
Modified: core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml 2010-03-12 14:41:17 UTC (rev 2062)
+++ core/trunk/exo.core.component.database/src/test/resources/conf/standalone/test-configuration.xml 2010-03-12 16:12:31 UTC (rev 2063)
@@ -51,6 +51,21 @@
</component>
<component>
+ <key>org.exoplatform.services.database.creator.DBCreator</key>
+ <type>org.exoplatform.services.database.creator.DBCreatorImpl</type>
+ <init-params>
+ <properties-param>
+ <name>db-creator-properties</name>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ <property name="script" value="test.sql" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<component-plugins>
16 years, 2 months
exo-jcr SVN: r2062 - in jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules: jcr and 1 other directory.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-03-12 09:41:17 -0500 (Fri, 12 Mar 2010)
New Revision: 2062
Added:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml
Removed:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
Log:
EXOJCR-532 fix arjuna to jbossts in docs
Deleted: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml 2010-03-12 14:28:59 UTC (rev 2061)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml 2010-03-12 14:41:17 UTC (rev 2062)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<chapter if="ch_arjuna_transaction_service">
- <?dbhtml filename="ch-arjuna-tranasction-service.html"?>
-
- <title>ArjunaTransactionService</title>
-
- <section>
- <title>Introduction</title>
-
- <para>ArjunaTransactionService implements eXo <link
- linkend="ch_transaction_service">TransactionService</link> and provides
- access to <ulink url="http://www.jboss.org/jbosstm/">JBoss Transaction
- Service (JBossTS)</ulink> JTA implementation via eXo container
- dependency.</para>
-
- <para>TransactionService used in JCR cache
- <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis>
- implementaion. See <ulink url="cluster-config.html">Cluster
- configuration</ulink> for example.</para>
- </section>
-
- <section>
- <title>Configuration</title>
-
- <para>Example configuration:</para>
-
- <programlisting> <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></programlisting>
-
- <para>timeout - XA transaction timeout in seconds</para>
- </section>
-</chapter>
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2010-03-12 14:28:59 UTC (rev 2061)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2010-03-12 14:41:17 UTC (rev 2062)
@@ -41,11 +41,11 @@
</listitem>
<listitem>
- <para>Ensure that you use JBoss <link
- linkend="ch_transaction_service">Transaction Service</link> (Arjuna)
- and JBoss <link linkend="ch-arjuna-tranasction-service">Transaction
- Manager</link>. Your exo-configuration.xml must contain such
- parts:</para>
+ <para>Ensure that you use JBossTS <link
+ linkend="ch_transaction_service">Transaction Service</link> and
+ JBossCache <link
+ linkend="ch-jbossts-tranasction-service">Transaction Manager</link>.
+ Your exo-configuration.xml must contain such parts:</para>
<programlisting><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
@@ -54,7 +54,7 @@
<component>
<key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.jbosscache.ArjunaTransactionService</type>
+ <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
<init-params>
<value-param>
<name>timeout</name>
Copied: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml (from rev 2061, jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml)
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml (rev 0)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml 2010-03-12 14:41:17 UTC (rev 2062)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter if="ch_jbossts_transaction_service">
+ <?dbhtml filename="ch-jbossts-tranasction-service.html"?>
+
+ <title>JBossTransactionsService</title>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>JBossTransactionsService implements eXo <link
+ linkend="ch_transaction_service">TransactionService</link> and provides
+ access to <ulink url="http://www.jboss.org/jbosstm/">JBoss Transaction
+ Service (JBossTS)</ulink> JTA implementation via eXo container
+ dependency.</para>
+
+ <para>TransactionService used in JCR cache
+ <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis>
+ implementaion. See <ulink url="cluster-config.html">Cluster
+ configuration</ulink> for example.</para>
+ </section>
+
+ <section>
+ <title>Configuration</title>
+
+ <para>Example configuration:</para>
+
+ <programlisting> <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component></programlisting>
+
+ <para>timeout - XA transaction timeout in seconds</para>
+ </section>
+</chapter>
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml 2010-03-12 14:28:59 UTC (rev 2061)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml 2010-03-12 14:41:17 UTC (rev 2062)
@@ -46,7 +46,7 @@
<xi:include href="jcr/query-handler-config.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="jcr/arjuna-transaction-service.xml"
+ <xi:include href="jcr/jbossts-transaction-service.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="jcr/transaction-manager-lookup.xml"
16 years, 2 months
exo-jcr SVN: r2061 - in jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules: jcr and 1 other directory.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-03-12 09:28:59 -0500 (Fri, 12 Mar 2010)
New Revision: 2061
Added:
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml
Removed:
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml
Modified:
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
Log:
EXOJCR-532 fix arjuna to jbossts in docs
Deleted: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml 2010-03-12 13:24:46 UTC (rev 2060)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml 2010-03-12 14:28:59 UTC (rev 2061)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<chapter if="ch_arjuna_transaction_service">
- <?dbhtml filename="ch-arjuna-tranasction-service.html"?>
-
- <title>ArjunaTransactionService</title>
-
- <section>
- <title>Introduction</title>
-
- <para>ArjunaTransactionService implements eXo <link
- linkend="ch_transaction_service">TransactionService</link> and provides
- access to <ulink url="http://www.jboss.org/jbosstm/">JBoss Transaction
- Service (JBossTS)</ulink> JTA implementation via eXo container
- dependency.</para>
-
- <para>TransactionService used in JCR cache
- <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis>
- implementaion. See <ulink url="cluster-config.html">Cluster
- configuration</ulink> for example.</para>
- </section>
-
- <section>
- <title>Configuration</title>
-
- <para>Example configuration:</para>
-
- <programlisting> <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></programlisting>
-
- <para>timeout - XA transaction timeout in seconds</para>
- </section>
-</chapter>
Modified: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2010-03-12 13:24:46 UTC (rev 2060)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2010-03-12 14:28:59 UTC (rev 2061)
@@ -41,11 +41,11 @@
</listitem>
<listitem>
- <para>Ensure that you use JBoss <link
- linkend="ch_transaction_service">Transaction Service</link> (Arjuna)
- and JBoss <link linkend="ch-arjuna-tranasction-service">Transaction
- Manager</link>. Your exo-configuration.xml must contain such
- parts:</para>
+ <para>Ensure that you use JBossTS <link
+ linkend="ch_transaction_service">Transaction Service</link> and
+ JBossCache <link
+ linkend="ch-jbossts-tranasction-service">Transaction Manager</link>.
+ Your exo-configuration.xml must contain such parts:</para>
<programlisting><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
@@ -54,7 +54,7 @@
<component>
<key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.jbosscache.ArjunaTransactionService</type>
+ <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
<init-params>
<value-param>
<name>timeout</name>
Copied: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml (from rev 2055, jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/arjuna-transaction-service.xml)
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml (rev 0)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr/jbossts-transaction-service.xml 2010-03-12 14:28:59 UTC (rev 2061)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter if="ch_jbossts_transaction_service">
+ <?dbhtml filename="ch-jbossts-tranasction-service.html"?>
+
+ <title>JBossTransactionsService</title>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>JBossTransactionsService implements eXo <link
+ linkend="ch_transaction_service">TransactionService</link> and provides
+ access to <ulink url="http://www.jboss.org/jbosstm/">JBoss Transaction
+ Service (JBossTS)</ulink> JTA implementation via eXo container
+ dependency.</para>
+
+ <para>TransactionService used in JCR cache
+ <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis>
+ implementaion. See <ulink url="cluster-config.html">Cluster
+ configuration</ulink> for example.</para>
+ </section>
+
+ <section>
+ <title>Configuration</title>
+
+ <para>Example configuration:</para>
+
+ <programlisting> <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component></programlisting>
+
+ <para>timeout - XA transaction timeout in seconds</para>
+ </section>
+</chapter>
Modified: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml 2010-03-12 13:24:46 UTC (rev 2060)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/jcr.xml 2010-03-12 14:28:59 UTC (rev 2061)
@@ -46,7 +46,7 @@
<xi:include href="jcr/query-handler-config.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="jcr/arjuna-transaction-service.xml"
+ <xi:include href="jcr/jbossts-transaction-service.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="jcr/transaction-manager-lookup.xml"
16 years, 2 months
exo-jcr SVN: r2060 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-03-12 08:24:46 -0500 (Fri, 12 Mar 2010)
New Revision: 2060
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
Log:
EXOJCR-555: Check for non-null value added before retrieving list of child nodes from JBC-node.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2010-03-12 08:56:45 UTC (rev 2059)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ParentNodeEvictionActionPolicy.java 2010-03-12 13:24:46 UTC (rev 2060)
@@ -21,6 +21,7 @@
import org.jboss.cache.Cache;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.eviction.DefaultEvictionActionPolicy;
import org.jboss.cache.eviction.EvictionActionPolicy;
@@ -75,15 +76,20 @@
{
// The expected data structure is of type $CHILD_NODES/${node-id}/${sub-node-name} or
// $CHILD_PROPS/${node-id}/${sub-property-name}
-
+
// We use the method getChildrenNamesDirect to avoid going through
- // the interceptor chain (EXOJCR-460)
- Set<Object> names = ((CacheSPI)cache).peek(parentFqn, false).getChildrenNamesDirect();
- if (names.isEmpty() || (names.size() == 1 && names.contains(fqn.get(2))))
+ // the intercepter chain (EXOJCR-460)
+ NodeSPI node = ((CacheSPI)cache).peek(parentFqn, false);
+ // Check if not null, possibly this node was concurrently removed
+ if (node != null)
{
- if (log.isTraceEnabled())
- log.trace("Evicting Fqn " + fqn);
- cache.evict(parentFqn);
+ Set<Object> names = node.getChildrenNamesDirect();
+ if (names.isEmpty() || (names.size() == 1 && names.contains(fqn.get(2))))
+ {
+ if (log.isTraceEnabled())
+ log.trace("Evicting Fqn " + fqn);
+ cache.evict(parentFqn);
+ }
}
}
}
16 years, 2 months
exo-jcr SVN: r2059 - in jcr/trunk: applications and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-03-12 03:56:45 -0500 (Fri, 12 Mar 2010)
New Revision: 2059
Modified:
jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
jcr/trunk/pom.xml
Log:
EXOJCR-586: set properly dep for slf4j
Modified: jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
===================================================================
--- jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2010-03-12 07:33:58 UTC (rev 2058)
+++ jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2010-03-12 08:56:45 UTC (rev 2059)
@@ -33,23 +33,6 @@
<url>http://www.exoplatform.org</url>
<description>eXo JCR Product</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>hsqldb</groupId>
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2010-03-12 07:33:58 UTC (rev 2058)
+++ jcr/trunk/pom.xml 2010-03-12 08:56:45 UTC (rev 2059)
@@ -43,7 +43,6 @@
<org.exoplatform.core.version>2.3.1-GA-SNAPSHOT</org.exoplatform.core.version>
<org.exoplatform.ws.version>2.1.1-GA-SNAPSHOT</org.exoplatform.ws.version>
<org.exoplatform.doc-style.version>2-SNAPSHOT</org.exoplatform.doc-style.version>
- <org.slf4j.version>1.5.8</org.slf4j.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -209,14 +208,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${org.slf4j.version}</version>
- <scope>test</scope>
+ <version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>${org.slf4j.version}</version>
- <scope>test</scope>
+ <version>1.5.8</version>
</dependency>
<dependency>
<groupId>stax</groupId>
16 years, 2 months
exo-jcr SVN: r2058 - in jcr/trunk: applications and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-03-12 02:33:58 -0500 (Fri, 12 Mar 2010)
New Revision: 2058
Modified:
jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
jcr/trunk/pom.xml
Log:
JCR-586: set slf4j version via property
Modified: jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
===================================================================
--- jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2010-03-11 17:30:03 UTC (rev 2057)
+++ jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2010-03-12 07:33:58 UTC (rev 2058)
@@ -38,13 +38,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.5.8</version>
+ <version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.5.8</version>
+ <version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2010-03-11 17:30:03 UTC (rev 2057)
+++ jcr/trunk/pom.xml 2010-03-12 07:33:58 UTC (rev 2058)
@@ -43,6 +43,7 @@
<org.exoplatform.core.version>2.3.1-GA-SNAPSHOT</org.exoplatform.core.version>
<org.exoplatform.ws.version>2.1.1-GA-SNAPSHOT</org.exoplatform.ws.version>
<org.exoplatform.doc-style.version>2-SNAPSHOT</org.exoplatform.doc-style.version>
+ <org.slf4j.version>1.5.8</org.slf4j.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -208,13 +209,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.5.8</version>
+ <version>${org.slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.5.8</version>
+ <version>${org.slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
16 years, 2 months