[exo-jcr-commits] exo-jcr SVN: r2053 - in jcr/tags/1.12.0-GA: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation and 2 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Mar 11 06:49:48 EST 2010
Author: dkatayev
Date: 2010-03-11 06:49:47 -0500 (Thu, 11 Mar 2010)
New Revision: 2053
Modified:
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/cache.xml
jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java
jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding-nodetypevalues.xml
jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding.xml
Log:
EXOJCR-483 Changes from EXOJCR-556 EXOJCR-565 EXOJCR-576 EXOJCR-579 ported to JCR 1.12.0-GA Tag
Modified: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/cache.xml
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/cache.xml 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/cache.xml 2010-03-11 11:49:47 UTC (rev 2053)
@@ -137,7 +137,7 @@
</tgroup>
</table>
- <para> </para>
+ <para></para>
</section>
<section>
@@ -377,8 +377,8 @@
<name>LRU</name>
<description>The lru cache creator</description>
<object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator">
- <field name="defaultTimeToLive"><long>${my-value}</long></field>
- <field name="defaultMaxAge"><long>${my-value}</long></field>
+ <field name="defaultTimeToLive"><long>${my-value}</long></field>
+ <field name="defaultMaxAge"><long>${my-value}</long></field>
</object>
</object-param>
...</programlisting>
@@ -394,8 +394,8 @@
<entry>This is the default value of the field
<emphasis>timeToLive</emphasis> described in the section
dedicated to this cache type. This value is only use when we
- defined a cache of this type with the super type
- <envar>ExoCacheConfig</envar>.</entry>
+ define a cache of this type with the old
+ configuration.</entry>
</row>
<row>
@@ -404,8 +404,8 @@
<entry>his is the default value of the field
<emphasis>maxAge</emphasis> described in the section
dedicated to this cache type. This value is only use when we
- defined a cache of this type with the super type
- <envar>ExoCacheConfig</envar>.</entry>
+ define a cache of this type with the old
+ configuration.</entry>
</row>
</tbody>
</tgroup>
@@ -444,7 +444,7 @@
<name>LFU</name>
<description>The lfu cache creator</description>
<object type="org.exoplatform.services.cache.impl.jboss.lfu.LFUExoCacheCreator">
- <field name="defaultMinNodes"><int>${my-value}</int></field>
+ <field name="defaultMinNodes"><int>${my-value}</int></field>
</object>
</object-param>
...</programlisting>
@@ -460,13 +460,45 @@
<entry>This is the default value of the field
<emphasis>minNodes</emphasis> described in the section
dedicated to this cache type. This value is only use when we
- defined a cache of this type with the super type
- <envar>ExoCacheConfig</envar>.</entry>
+ define a cache of this type with the old
+ configuration.</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
+
+ <section>
+ <title>EA Cache Creator - Expiration Algorithm</title>
+
+ <programlisting>...
+<object-param>
+ <name>EA</name>
+ <description>The ea cache creator</description>
+ <object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheCreator">
+ <field name="defaultExpirationTimeout"><long>2000</long></field>
+ </object>
+</object-param>
+...</programlisting>
+
+ <table>
+ <title>Fields description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>defaultExpirationTimeout</entry>
+
+ <entry>This is the default value of the field
+ <emphasis>minNodes</emphasis> described in the section
+ dedicated to this cache type. This value is only use when we
+ define a cache of this type with the old
+ configuration.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
</section>
</section>
@@ -476,7 +508,7 @@
<section>
<title>How to define a cache?</title>
- <para>You have 2 ways to define a cache which are: </para>
+ <para>You have 2 ways to define a cache which are:</para>
<itemizedlist>
<listitem>
@@ -952,6 +984,105 @@
</listitem>
</itemizedlist>
</section>
+
+ <section>
+ <title>EA Cache - Expiration Algorithm</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>New configuration<programlisting>...
+ <object-param>
+ <name>ea</name>
+ <description>The ea cache configuration</description>
+ <object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
+ <field name="name"><string>ea</string></field>
+ <field name="maxNodes"><int>${my-value}</int></field>
+ <field name="minTimeToLive"><long>${my-value}</long></field>
+ <field name="expirationTimeout"><long>${my-value}</long></field>
+ </object>
+ </object-param>
+...</programlisting></para>
+
+ <table>
+ <title>Fields description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>maxNodes</entry>
+
+ <entry>This is the maximum number of nodes allowed in this
+ region. 0 denotes immediate expiry, -1 denotes no
+ limit.</entry>
+ </row>
+
+ <row>
+ <entry>minTimeToLive</entry>
+
+ <entry>The minimum amount of time (in milliseconds) a node
+ must be allowed to live after being accessed before it is
+ allowed to be considered for eviction. 0 denotes that this
+ feature is disabled, which is the default value.</entry>
+ </row>
+
+ <row>
+ <entry>expirationTimeout</entry>
+
+ <entry>This is the timeout after which the cache entry
+ must be evicted.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </listitem>
+
+ <listitem>
+ <para>Old configuration<programlisting>...
+ <object-param>
+ <name>ea-with-old-config</name>
+ <description>The ea cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name"><string>lfu-with-old-config</string></field>
+ <field name="maxSize"><int>${my-value}</int></field>
+ <field name="liveTime"><long>${my-value}</long></field>
+ <field name="implementation"><string>EA</string></field>
+ </object>
+ </object-param>
+...</programlisting></para>
+
+ <table>
+ <title>Fields description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>maxSize</entry>
+
+ <entry>This is the maximum number of nodes allowed in this
+ region. 0 denotes immediate expiry, -1 denotes no
+ limit.</entry>
+ </row>
+
+ <row>
+ <entry>liveTime</entry>
+
+ <entry>The minimum amount of time (in milliseconds) a node
+ must be allowed to live after being accessed before it is
+ allowed to be considered for eviction. 0 denotes that this
+ feature is disabled, which is the default value.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para><note>
+ <para>For the fields <emphasis>expirationTimeout</emphasis>
+ needed by JBoss cache, we will use the default values provided
+ by the creator.</para>
+ </note></para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</section>
</chapter>
Modified: jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
===================================================================
--- jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml 2010-03-11 11:49:47 UTC (rev 2053)
@@ -350,6 +350,60 @@
<name>default.realm.name</name>
<value>my-exo-domain</value>
</value-param>
+ <!-- The default portal container definition -->
+ <!-- It cans be used to avoid duplicating configuration -->
+ <object-param>
+ <name>default.portal.definition</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinition">
+ <!-- All the dependencies of the portal container ordered by loading priority -->
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>foo</string>
+ </value>
+ <value>
+ <string>foo2</string>
+ </value>
+ <value>
+ <string>foo3</string>
+ </value>
+ </collection>
+ </field>
+ <!-- A map of settings tied to the default portal container -->
+ <field name="settings">
+ <map type="java.util.HashMap">
+ <entry>
+ <key>
+ <string>foo5</string>
+ </key>
+ <value>
+ <string>value</string>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <string>string</string>
+ </key>
+ <value>
+ <string>value0</string>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <string>int</string>
+ </key>
+ <value>
+ <int>100</int>
+ </value>
+ </entry>
+ </map>
+ </field>
+ <!-- The path to the external properties file -->
+ <field name="externalSettingsPath">
+ <string>classpath:/org/exoplatform/container/definition/default-settings.properties</string>
+ </field>
+ </object>
+ </object-param>
</init-params>
</component></programlisting>
@@ -379,6 +433,17 @@
<entry>The name of the default realm. This field is
optional.</entry>
</row>
+
+ <row>
+ <entry>default.portal.definition</entry>
+
+ <entry>The definition of the default portal container. This
+ field is optional. The expected type is
+ <envar>org.exoplatform.container.definition.PortalContainerDefinition</envar>
+ that is described below. Allow the parameters defined in this
+ default <envar>PortalContainerDefinition</envar> will be the
+ default values.</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -482,7 +547,8 @@
<table>
<title>Descriptions of the fields of
- <envar>PortalContainerDefinition</envar></title>
+ <envar>PortalContainerDefinition</envar> when it is used to define a
+ new portal container</title>
<tgroup cols="2">
<tbody>
@@ -490,7 +556,7 @@
<entry>name</entry>
<entry>The name of the portal container. This field is
- mandatory.</entry>
+ mandatory .</entry>
</row>
<row>
@@ -499,7 +565,7 @@
<entry>The name of the context name of the rest web
application. This field is optional. The default value will
the value define at the <envar>PortalContainerConfig</envar>
- level if it is not null, "rest" otherwise.</entry>
+ level.</entry>
</row>
<row>
@@ -507,22 +573,24 @@
<entry>The name of the realm. This field is optional. The
default value will the value define at the
- <envar>PortalContainerConfig</envar> level if it is not null,
- "exo-domain" otherwise.</entry>
+ <envar>PortalContainerConfig</envar> level.</entry>
</row>
<row>
<entry>dependencies</entry>
<entry>All the dependencies of the portal container ordered by
- loading priority. The dependencies are in fact the list of the
- context names of the web applications from which the portal
- container depends. This field is optional. The dependency
- order is really crucial since it will be interpreted the same
- way by several components of the platform. All those
- components, will consider the 1st element in the list less
- important than the second element and so on. It is currently
- used to:<itemizedlist>
+ loading priority. This field is optional. The default value
+ will the value define at the
+ <envar>PortalContainerConfig</envar> level. The dependencies
+ are in fact the list of the context names of the web
+ applications from which the portal container depends. This
+ field is optional. The dependency order is really crucial
+ since it will be interpreted the same way by several
+ components of the platform. All those components, will
+ consider the 1st element in the list less important than the
+ second element and so on. It is currently used
+ to:<itemizedlist>
<listitem>
<para>Know the loading order of all the
dependencies.</para>
@@ -571,7 +639,11 @@
<entry>A <envar>java.util.Map</envar> of internal parameters
that we would like to tie the portal container. Those
parameters could have any type of value. This field is
- optional.</entry>
+ optional. If some internal settings are defined at the
+ <envar>PortalContainerConfig</envar> level, the two maps of
+ settings will be merged. If a setting with the same name is
+ defined in both maps, it will keep the value defined at the
+ <envar>PortalContainerDefinition</envar> level.</entry>
</row>
<row>
@@ -579,9 +651,13 @@
<entry>The path of the external properties file to load as
default settings to the portal container. This field is
- optional. The external properties files can be either of type
- "properties" or of type "xml". The path will be interpreted as
- follows:<orderedlist>
+ optional. If some external settings are defined at the
+ <envar>PortalContainerConfig</envar> level, the two maps of
+ settings will be merged. If a setting with the same name is
+ defined in both maps, it will keep the value defined at the
+ <envar>PortalContainerDefinition</envar> level. The external
+ properties files can be either of type "properties" or of type
+ "xml". The path will be interpreted as follows:<orderedlist>
<listitem>
<para>The path doesn't contain any prefix of type
"classpath:", "jar:" or "file:", we assume that the file
@@ -612,6 +688,148 @@
</tgroup>
</table>
+ <table>
+ <title>Descriptions of the fields of
+ <envar>PortalContainerDefinition</envar> when it is used to define
+ the default portal container</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>name</entry>
+
+ <entry>The name of the portal container. This field is
+ optional. The default portal name will be:<orderedlist>
+ <listitem>
+ <para>If this field is not empty, then the default value
+ will be the value of this field.</para>
+ </listitem>
+
+ <listitem>
+ <para>If this field is empty and the value of the
+ parameter <emphasis>default.portal.container</emphasis>
+ is not empty, then the default value will be the value
+ of the parameter.</para>
+ </listitem>
+
+ <listitem>
+ <para>If this field and the parameter
+ <emphasis>default.portal.container</emphasis> are both
+ empty, the default value will be
+ <emphasis>"portal".</emphasis></para>
+ </listitem>
+ </orderedlist></entry>
+ </row>
+
+ <row>
+ <entry>restContextName</entry>
+
+ <entry>The name of the context name of the rest web
+ application. This field is optional. The default value wil
+ be:<orderedlist>
+ <listitem>
+ <para>If this field is not empty, then the default value
+ will be the value of this field.</para>
+ </listitem>
+
+ <listitem>
+ <para>f this field is empty and the value of the
+ parameter <emphasis>default.rest.context</emphasis> is
+ not empty, then the default value will be the value of
+ the parameter.</para>
+ </listitem>
+
+ <listitem>
+ <para>f this field and the parameter
+ <emphasis>default.rest.context</emphasis> are both
+ empty, the default value will be
+ <emphasis>"rest".</emphasis></para>
+ </listitem>
+ </orderedlist></entry>
+ </row>
+
+ <row>
+ <entry>realmName</entry>
+
+ <entry>The name of the realm. This field is optional. The
+ default value wil be:<orderedlist>
+ <listitem>
+ <para>If this field is not empty, then the default value
+ will be the value of this field.</para>
+ </listitem>
+
+ <listitem>
+ <para>f this field is empty and the value of the
+ parameter <emphasis>default.realm.name</emphasis> is not
+ empty, then the default value will be the value of the
+ parameter.</para>
+ </listitem>
+
+ <listitem>
+ <para>f this field and the parameter
+ <emphasis>default.realm.name</emphasis> are both empty,
+ the default value will be
+ <emphasis>"exo-domain".</emphasis></para>
+ </listitem>
+ </orderedlist></entry>
+ </row>
+
+ <row>
+ <entry>dependencies</entry>
+
+ <entry>All the dependencies of the portal container ordered by
+ loading priority. This field is optional. If this field has a
+ non empty value, it will be the default list of
+ dependencies.</entry>
+ </row>
+
+ <row>
+ <entry>settings</entry>
+
+ <entry>A <envar>java.util.Map</envar> of internal parameters
+ that we would like to tie the default portal container. Those
+ parameters could have any type of value. This field is
+ optional.</entry>
+ </row>
+
+ <row>
+ <entry>externalSettingsPath</entry>
+
+ <entry>The path of the external properties file to load as
+ default settings to the default portal container. This field
+ is optional. The external properties files can be either of
+ type "properties" or of type "xml". The path will be
+ interpreted as follows:<orderedlist>
+ <listitem>
+ <para>The path doesn't contain any prefix of type
+ "classpath:", "jar:" or "file:", we assume that the file
+ could be externalized so we apply the following
+ rules:<orderedlist>
+ <listitem>
+ <para>A file exists at
+ <emphasis>${exo-conf-dir}/portal/${externalSettingsPath}</emphasis>,
+ we will load this file.</para>
+ </listitem>
+
+ <listitem>
+ <para>No file exists at the previous path, we then
+ assume that the path cans be interpreted by the
+ <envar>ConfigurationManager</envar>.</para>
+ </listitem>
+ </orderedlist></para>
+ </listitem>
+
+ <listitem>
+ <para>The path contains a prefix, we then assume that
+ the path cans be interpreted by the
+ <envar>ConfigurationManager</envar>.</para>
+ </listitem>
+ </orderedlist></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<para>Internal and external settings are both optional, but if we give
a non empty value for both the application will merge the settings. If
the same setting name exists in both settings, we apply the following
@@ -739,11 +957,34 @@
</configuration></programlisting></para>
<para>In the properties file corresponding to the external settings,
- you can reuse variables previously defined to create a new variable.
- In this case the prefix "<emphasis>portal.container.</emphasis>" is
- not needed, see an example below:<programlisting>my-var1=value 1
+ you can reuse variables previously defined (in the external settings
+ or in the internal settings) to create a new variable. In this case
+ the prefix "<emphasis>portal.container.</emphasis>" is not needed, see
+ an example below:<programlisting>my-var1=value 1
my-var2=value 2
-complex-value=${my-var1}-${my-var2}</programlisting> </para>
+complex-value=${my-var1}-${my-var2}</programlisting></para>
+
+ <para>In the external and internal settings, you can also use create
+ variables based on value of System paramaters. The System parameters
+ can either be defined at launch time or thanks to the
+ <envar>PropertyConfigurator</envar> (see next section for more
+ details). See an example below:</para>
+
+ <programlisting>temp-dir=${java.io.tmpdir}${file.separator}my-temp</programlisting>
+
+ <para>However, for the internal settings you can use System parameters
+ only to define settings of type
+ <envar>java.lang.String</envar>.</para>
+
+ <para>It cans be also very usefull to define a generic variable in the
+ settings of the default portal container, the value of this variable
+ will change according to the current portal container. See below an
+ example:<programlisting>my-generic-var=value of the portal container "${name}"</programlisting></para>
+
+ <para>If this variable is defined at the default portal container
+ level, the value of this variable for a portal container called
+ <emphasis>"foo"</emphasis> will be <emphasis>value of the portal
+ container "foo"</emphasis>.</para>
</section>
</section>
</section>
Modified: jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java
===================================================================
--- jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCStorageConnection.java 2010-03-11 11:49:47 UTC (rev 2053)
@@ -28,7 +28,6 @@
import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPath;
-import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
@@ -50,7 +49,6 @@
import java.util.Map;
import java.util.StringTokenizer;
-import javax.jcr.InvalidItemStateException;
import javax.jcr.RepositoryException;
/**
@@ -88,11 +86,6 @@
protected String FIND_REFERENCE_PROPERTIES_CQ;
/**
- * FIND_ITEM_QPATH_BY_ID_CQ.
- */
- protected String FIND_ITEM_QPATH_BY_ID_CQ;
-
- /**
* Class needed to store node details (property also) since result set is not sorted in valid way.
*/
private static class TempNodeData
@@ -691,84 +684,6 @@
}
}
- /**
- * {@inheritDoc}
- */
- @Override
- protected QPath traverseQPath(String cpid) throws SQLException, InvalidItemStateException, IllegalNameException
- {
- String id = getIdentifier(cpid);
- if (id.equals(Constants.ROOT_UUID))
- {
- return Constants.ROOT_PATH;
- }
- // get item by Identifier usecase
- List<QPathEntry> qrpath = new ArrayList<QPathEntry>(); // reverted path
- String caid = cpid; // container ancestor id
- boolean isRoot = false;
- do
- {
- ResultSet result = null;
- try
- {
- result = findItemQPathByIdentifierCQ(caid);
- if (!result.next())
- throw new InvalidItemStateException("Parent not found, uuid: " + getIdentifier(caid));
-
- QPathEntry qpe1 =
- new QPathEntry(InternalQName.parse(result.getString(COLUMN_NAME)), result.getInt(COLUMN_INDEX));
- boolean isChild = caid.equals(result.getString(COLUMN_ID));
- caid = result.getString(COLUMN_PARENTID);
- if (result.next())
- {
- QPathEntry qpe2 =
- new QPathEntry(InternalQName.parse(result.getString(COLUMN_NAME)), result.getInt(COLUMN_INDEX));
- if (isChild)
- {
- // The child is the first result then we have the parent
- qrpath.add(qpe1);
- qrpath.add(qpe2);
- // We need to take the value of the parent node
- caid = result.getString(COLUMN_PARENTID);
- }
- else
- {
- // The parent is the first result then we have the child
- qrpath.add(qpe2);
- qrpath.add(qpe1);
- }
- }
- else
- {
- qrpath.add(qpe1);
- }
- }
- finally
- {
- result.close();
- }
- if (caid.equals(Constants.ROOT_PARENT_UUID) || (id = getIdentifier(caid)).equals(Constants.ROOT_UUID))
- {
- if (id.equals(Constants.ROOT_UUID))
- {
- qrpath.add(Constants.ROOT_PATH.getEntries()[0]);
- }
- isRoot = true;
- }
- }
- while (!isRoot);
-
- QPathEntry[] qentries = new QPathEntry[qrpath.size()];
- int qi = 0;
- for (int i = qrpath.size() - 1; i >= 0; i--)
- {
- qentries[qi++] = qrpath.get(i);
- }
- return new QPath(qentries);
- }
-
- protected abstract ResultSet findItemQPathByIdentifierCQ(String identifier) throws SQLException;
-
protected abstract ResultSet findChildNodesByParentIdentifierCQ(String parentIdentifier) throws SQLException;
protected abstract ResultSet findChildPropertiesByParentIdentifierCQ(String parentIdentifier) throws SQLException;
Modified: jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2010-03-11 11:49:47 UTC (rev 2053)
@@ -213,11 +213,6 @@
+ " from JCR_MITEM I, JCR_MVALUE V"
+ " where I.I_CLASS=2 and I.PARENT_ID=? and (I.NAME='[http://www.jcp.org/jcr/1.0]primaryType' or I.NAME='[http://www.jcp.org/jcr/1.0]mixinTypes' or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner' or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions') and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
- FIND_ITEM_QPATH_BY_ID_CQ =
- "select I.ID, I.PARENT_ID, I.NAME, I.I_INDEX"
- + " from JCR_MITEM I, (SELECT ID, PARENT_ID from JCR_MITEM where ID=?) J"
- + " where I.ID = J.ID or I.ID = J.PARENT_ID";
-
FIND_NODES_COUNT_BY_PARENTID = "select count(ID) from JCR_MITEM" + " where I_CLASS=1 and PARENT_ID=?";
FIND_PROPERTIES_BY_PARENTID = "select * from JCR_MITEM" + " where I_CLASS=2 and PARENT_ID=?" + " order by ID";
@@ -655,21 +650,6 @@
* {@inheritDoc}
*/
@Override
- protected ResultSet findItemQPathByIdentifierCQ(String identifier) throws SQLException
- {
- if (findItemQPathByIdentifierCQ == null)
- findItemQPathByIdentifierCQ = dbConnection.prepareStatement(FIND_ITEM_QPATH_BY_ID_CQ);
- else
- findItemQPathByIdentifierCQ.clearParameters();
-
- findItemQPathByIdentifierCQ.setString(1, identifier);
- return findItemQPathByIdentifierCQ.executeQuery();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
protected ResultSet findReferencePropertiesCQ(String nodeIdentifier) throws SQLException
{
if (findReferencePropertiesCQ == null)
Modified: jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2010-03-11 11:49:47 UTC (rev 2053)
@@ -221,11 +221,6 @@
+ " from JCR_SITEM I, JCR_SVALUE V"
+ " where I.I_CLASS=2 and I.CONTAINER_NAME=? and I.PARENT_ID=? and (I.NAME='[http://www.jcp.org/jcr/1.0]primaryType' or I.NAME='[http://www.jcp.org/jcr/1.0]mixinTypes' or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner' or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions') and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
- FIND_ITEM_QPATH_BY_ID_CQ =
- "select I.ID, I.PARENT_ID, I.NAME, I.I_INDEX"
- + " from JCR_SITEM I, (SELECT ID, PARENT_ID from JCR_SITEM where ID=?) J"
- + " where I.ID = J.ID or I.ID = J.PARENT_ID";
-
FIND_NODES_COUNT_BY_PARENTID =
"select count(ID) from JCR_SITEM" + " where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?";
@@ -679,21 +674,6 @@
* {@inheritDoc}
*/
@Override
- protected ResultSet findItemQPathByIdentifierCQ(String identifier) throws SQLException
- {
- if (findItemQPathByIdentifierCQ == null)
- findItemQPathByIdentifierCQ = dbConnection.prepareStatement(FIND_ITEM_QPATH_BY_ID_CQ);
- else
- findItemQPathByIdentifierCQ.clearParameters();
-
- findItemQPathByIdentifierCQ.setString(1, identifier);
- return findItemQPathByIdentifierCQ.executeQuery();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
protected ResultSet findReferencePropertiesCQ(String nodeIdentifier) throws SQLException
{
if (findReferencePropertiesCQ == null)
Modified: jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding-nodetypevalues.xml
===================================================================
--- jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding-nodetypevalues.xml 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding-nodetypevalues.xml 2010-03-11 11:49:47 UTC (rev 2053)
@@ -1,4 +1,6 @@
<binding>
+ <!-- the default deserializer to use for String -->
+ <format type="java.lang.String" deserializer="org.exoplatform.container.xml.Deserializer.cleanString"/>
<mapping name="nodeTypes" class="org.exoplatform.services.jcr.core.nodetype.NodeTypeValuesList">
<collection field="nodeTypeValuesList" item-type="org.exoplatform.services.jcr.core.nodetype.NodeTypeValue" type="java.util.ArrayList" />
Modified: jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding.xml 2010-03-11 11:49:03 UTC (rev 2052)
+++ jcr/tags/1.12.0-GA/exo.jcr.component.core/src/main/resources/binding.xml 2010-03-11 11:49:47 UTC (rev 2053)
@@ -1,4 +1,6 @@
<binding>
+ <!-- the default deserializer to use for String -->
+ <format type="java.lang.String" deserializer="org.exoplatform.container.xml.Deserializer.cleanString"/>
<mapping name="repository-service" class="org.exoplatform.services.jcr.config.RepositoryServiceConfiguration">
<value name="default-repository" field="defaultRepositoryName" style="attribute" />
More information about the exo-jcr-commits
mailing list