exo-jcr SVN: r1072 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/dataflow/serialization and 4 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2009-12-15 12:10:28 -0500 (Tue, 15 Dec 2009)
New Revision: 1072
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
Log:
EXOJCR-274 TransientValueData rework part4: params switched
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -51,13 +51,12 @@
/**
* ByteArrayPersistedValueData constructor.
- *
- * @param data
- * byte[]
* @param orderNumber
* int
+ * @param data
+ * byte[]
*/
- public ByteArrayPersistedValueData(byte[] data, int orderNumber)
+ public ByteArrayPersistedValueData(int orderNumber, byte[] data)
{
super(orderNumber);
this.data = data;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -389,7 +389,7 @@
if (vd.isByteArray())
{
- pvd = new ByteArrayPersistedValueData(vd.getAsByteArray(), i);
+ pvd = new ByteArrayPersistedValueData(i, vd.getAsByteArray());
values.add(pvd);
}
else
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -102,7 +102,7 @@
{
byte[] data = new byte[in.readInt()];
in.readFully(data);
- return new ByteArrayPersistedValueData(data, orderNumber);
+ return new ByteArrayPersistedValueData(orderNumber, data);
}
else
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -1831,7 +1831,7 @@
if (buffer == null)
return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
- return new ByteArrayPersistedValueData(buffer, orderNumber);
+ return new ByteArrayPersistedValueData(orderNumber, buffer);
}
/**
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -96,7 +96,7 @@
System.arraycopy(buff, 0, res, rpos, r);
rpos += r;
}
- return new ByteArrayPersistedValueData(res, orderNum);
+ return new ByteArrayPersistedValueData(orderNum, res);
}
finally
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -193,39 +193,39 @@
private void initDataAsPersisted()
{
List<ValueData> stringData = new ArrayList<ValueData>();
- stringData.add(new ByteArrayPersistedValueData("property data 1".getBytes(), 0));
- stringData.add(new ByteArrayPersistedValueData("property data 2".getBytes(), 1));
- stringData.add(new ByteArrayPersistedValueData("property data 3".getBytes(), 2));
+ stringData.add(new ByteArrayPersistedValueData(0, "property data 1".getBytes()));
+ stringData.add(new ByteArrayPersistedValueData(1, "property data 2".getBytes()));
+ stringData.add(new ByteArrayPersistedValueData(2, "property data 3".getBytes()));
propertyData11 =
new PersistedPropertyData(propertyUuid11, propertyPath11, nodeUuid1, 1, PropertyType.STRING, false, stringData);
List<ValueData> binData = new ArrayList<ValueData>();
- binData.add(new ByteArrayPersistedValueData("property data bin 1".getBytes(), 0));
+ binData.add(new ByteArrayPersistedValueData(0, "property data bin 1".getBytes()));
propertyData12 =
new PersistedPropertyData(propertyUuid12, propertyPath12, nodeUuid1, 1, PropertyType.BINARY, false, binData);
List<ValueData> stringData1 = new ArrayList<ValueData>();
- stringData1.add(new ByteArrayPersistedValueData("property data 1".getBytes(), 0));
- stringData1.add(new ByteArrayPersistedValueData("property data 2".getBytes(), 1));
- stringData1.add(new ByteArrayPersistedValueData("property data 3".getBytes(), 2));
+ stringData1.add(new ByteArrayPersistedValueData(0, "property data 1".getBytes()));
+ stringData1.add(new ByteArrayPersistedValueData(1, "property data 2".getBytes()));
+ stringData1.add(new ByteArrayPersistedValueData(2, "property data 3".getBytes()));
propertyData21 =
new PersistedPropertyData(propertyUuid21, propertyPath21, nodeUuid2, 1, PropertyType.STRING, true, stringData);
List<ValueData> booleanData = new ArrayList<ValueData>();
- booleanData.add(new ByteArrayPersistedValueData("true".getBytes(), 0));
+ booleanData.add(new ByteArrayPersistedValueData(0, "true".getBytes()));
propertyData22 =
new PersistedPropertyData(propertyUuid22, propertyPath22, nodeUuid2, 1, PropertyType.BOOLEAN, false,
booleanData);
List<ValueData> longData = new ArrayList<ValueData>();
- longData.add(new ByteArrayPersistedValueData(new Long(123456).toString().getBytes(), 0));
+ longData.add(new ByteArrayPersistedValueData(0, new Long(123456).toString().getBytes()));
propertyData311 =
new PersistedPropertyData(propertyUuid311, propertyPath311, nodeUuid31, 1, PropertyType.LONG, false, longData);
List<ValueData> refData = new ArrayList<ValueData>();
- refData.add(new ByteArrayPersistedValueData(nodeUuid1.getBytes(), 0));
- refData.add(new ByteArrayPersistedValueData(nodeUuid2.getBytes(), 1));
- refData.add(new ByteArrayPersistedValueData(nodeUuid3.getBytes(), 2));
+ refData.add(new ByteArrayPersistedValueData(0, nodeUuid1.getBytes()));
+ refData.add(new ByteArrayPersistedValueData(1, nodeUuid2.getBytes()));
+ refData.add(new ByteArrayPersistedValueData(2, nodeUuid3.getBytes()));
propertyData312 =
new PersistedPropertyData(propertyUuid312, propertyPath312, nodeUuid31, 1, PropertyType.REFERENCE, true,
refData);
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -45,7 +45,7 @@
public void testCreateByteArrayValueData() throws Exception
{
byte[] buf = "0123456789".getBytes();
- ByteArrayPersistedValueData vd = new ByteArrayPersistedValueData(buf, 0);
+ ByteArrayPersistedValueData vd = new ByteArrayPersistedValueData(0, buf);
assertTrue(vd.isByteArray());
assertEquals(10, vd.getLength());
assertEquals(0, vd.getOrderNumber());
16 years, 7 months
exo-jcr SVN: r1071 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/dataflow and 9 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2009-12-15 12:08:54 -0500 (Tue, 15 Dec 2009)
New Revision: 1071
Added:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractSessionValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFilePersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FilePersistedValueData.java
Removed:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BinaryValue.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/DateValue.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCleanableFileStreamValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableFileIOChannelTestBase.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java
Log:
EXOJCR-274 TransientValueData rework part3: stream spooling, temp files handling. Binary Value handling in session.
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BaseValue.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -22,7 +22,7 @@
import org.exoplatform.services.jcr.core.value.ReadableBinaryValue;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractTransientValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractSessionValueData;
import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -53,7 +53,7 @@
protected final int type;
- protected LocalTransientValueData data;
+ protected LocalSessionValueData data;
protected ValueData internalData;
@@ -76,15 +76,15 @@
*
* @param asStream
* boolean
- * @return LocalTransientValueData
+ * @return LocalSessionValueData
* @throws IOException
* if error
*/
- protected LocalTransientValueData getLocalData(boolean asStream) throws IOException
+ protected LocalSessionValueData getLocalData(boolean asStream) throws IOException
{
if (data == null)
{
- data = new LocalTransientValueData(asStream);
+ data = new LocalSessionValueData(asStream);
}
return data;
@@ -323,7 +323,7 @@
/**
* Session scope ValueData.
*/
- protected class LocalTransientValueData extends AbstractTransientValueData
+ protected class LocalSessionValueData extends AbstractSessionValueData
{
protected InputStream stream;
@@ -340,7 +340,7 @@
* @throws IOException
* if error
*/
- public LocalTransientValueData(boolean asStream) throws IOException
+ public LocalSessionValueData(boolean asStream) throws IOException
{
super(getInternalData().getOrderNumber());
ValueData idata = getInternalData();
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BinaryValue.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BinaryValue.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/BinaryValue.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -77,7 +77,7 @@
public BinaryValue(InputStream stream, FileCleaner fileCleaner, File tempDirectory, int maxFufferSize)
throws IOException
{
- this(new TransientValueData(0, null, stream, null, fileCleaner, maxFufferSize, tempDirectory, true));
+ this(new TransientValueData(0, null, stream, null, fileCleaner, maxFufferSize, tempDirectory, true, false));
}
BinaryValue(TransientValueData data) throws IOException
@@ -106,7 +106,7 @@
}
@Override
- protected LocalTransientValueData getLocalData(boolean asStream) throws IOException
+ protected LocalSessionValueData getLocalData(boolean asStream) throws IOException
{
if (this.changed)
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/DateValue.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/DateValue.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/DateValue.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -147,7 +147,7 @@
String inernalString = getInternalString();
// force replace of data
- data = new LocalTransientValueData(true);
+ data = new LocalSessionValueData(true);
// Replace internall stram
data.stream = new ByteArrayInputStream(inernalString.getBytes(Constants.DEFAULT_ENCODING));
Copied: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractSessionValueData.java (from rev 1062, jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java)
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractSessionValueData.java (rev 0)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractSessionValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.dataflow;
+
+import org.exoplatform.services.jcr.datamodel.ValueData;
+
+/**
+ *
+ * Created by The eXo Platform SAS .
+ *
+ * @author Gennady Azarenkov
+ * @version $Id:AbstractValueData.java 12534 2007-02-02 15:30:52Z peterit $
+ */
+
+public abstract class AbstractSessionValueData implements ValueData
+{
+
+ protected int orderNumber;
+
+ protected AbstractSessionValueData(int orderNumber)
+ {
+ this.orderNumber = orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final int getOrderNumber()
+ {
+ return orderNumber;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ValueData)
+ {
+ return this.equals((ValueData)obj);
+ }
+
+ return false;
+ }
+}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractSessionValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/AbstractTransientValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.dataflow;
-
-import org.exoplatform.services.jcr.datamodel.ValueData;
-
-/**
- *
- * Created by The eXo Platform SAS .
- *
- * @author Gennady Azarenkov
- * @version $Id:AbstractValueData.java 12534 2007-02-02 15:30:52Z peterit $
- */
-
-public abstract class AbstractTransientValueData implements ValueData
-{
-
- protected int orderNumber;
-
- protected AbstractTransientValueData(int orderNumber)
- {
- this.orderNumber = orderNumber;
- }
-
- /**
- * {@inheritDoc}
- */
- public final int getOrderNumber()
- {
- return orderNumber;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean equals(Object obj)
- {
- if (obj instanceof ValueData)
- {
- return this.equals((ValueData)obj);
- }
-
- return false;
- }
-}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/EditableValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -51,7 +51,7 @@
{
// send bytes to super.<init>
- super(orderNumber, bytes, null, null, fileCleaner, maxBufferSize, tempDirectory, true);
+ super(orderNumber, bytes, null, null, fileCleaner, maxBufferSize, tempDirectory, true, true);
this.maxIOBuffSize = calcMaxIOSize();
@@ -64,7 +64,7 @@
{
// don't send any data there (no stream, no bytes)
- super(orderNumber, null, null, null, fileCleaner, maxBufferSize, tempDirectory, true);
+ super(orderNumber, null, null, null, fileCleaner, maxBufferSize, tempDirectory, true, true);
this.maxIOBuffSize = calcMaxIOSize();
@@ -119,7 +119,7 @@
{
// don't send any data there (no stream, no bytes)
- super(orderNumber, null, null, null, fileCleaner, maxBufferSize, tempDirectory, true);
+ super(orderNumber, null, null, null, fileCleaner, maxBufferSize, tempDirectory, true, true);
this.maxIOBuffSize = calcMaxIOSize();
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/TransientValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -24,7 +24,7 @@
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.SpoolFile;
@@ -63,7 +63,7 @@
protected ValueData delegate;
- protected class NewValueData extends AbstractTransientValueData
+ protected class NewValueData extends AbstractSessionValueData
{
protected byte[] data;
@@ -141,17 +141,20 @@
* File
* @param deleteSpoolFile
* boolean
+ * @param closeTmpStream
+ * boolean
* @throws IOException
* if read error
*/
protected NewValueData(int orderNumber, byte[] bytes, InputStream stream, File spoolFile,
- FileCleaner fileCleaner, int maxBufferSize, File tempDirectory, boolean deleteSpoolFile) throws IOException
+ FileCleaner fileCleaner, int maxBufferSize, File tempDirectory, boolean deleteSpoolFile, boolean closeTmpStream)
+ throws IOException
{
super(orderNumber);
this.data = bytes;
this.tmpStream = stream;
- this.closeTmpStream = true;
+ this.closeTmpStream = closeTmpStream;
this.spoolFile = spoolFile;
this.fileCleaner = fileCleaner;
this.maxBufferSize = maxBufferSize;
@@ -276,69 +279,7 @@
return data != null;
}
- // TODO
- // /**
- // * {@inheritDoc}
- // */
- // @Override
- // public TransientValueData createTransientCopy() throws RepositoryException
- // {
- // if (isByteArray())
- // {
- // // bytes, make a copy of real data
- // // TODO JCR-992 don't copy bytes
- // // byte[] newBytes = new byte[data.length];
- // // System.arraycopy(data, 0, newBytes, 0, newBytes.length);
- //
- // try
- // {
- // return new TransientValueData(orderNumber, data, // TODO JCR-992
- // null, null, fileCleaner, maxBufferSize, tempDirectory, deleteSpoolFile);
- // }
- // catch (IOException e)
- // {
- // throw new RepositoryException(e);
- // }
- // }
- // else
- // {
- // // stream (or file) based , i.e. shared across sessions
- // return this;
- // }
- // }
-
/**
- * Create TransientCopy of data.
- *
- * TODO workaround for JBC branch, issued by the FileRestoreTest.
- *
- * @return TransientValueData
- * @throws RepositoryException
- */
- public TransientValueData createTransientCopy1() throws RepositoryException
- {
- try
- {
- if (isByteArray())
- {
- // bytes based
- return new TransientValueData(orderNumber, data, null, null, fileCleaner, maxBufferSize, tempDirectory,
- deleteSpoolFile);
- }
- else
- {
- // stream (or file) based , i.e. shared across sessions
- return new TransientValueData(orderNumber, null, getAsStream(), null, fileCleaner, maxBufferSize,
- tempDirectory, true);
- }
- }
- catch (IOException e)
- {
- throw new RepositoryException(e);
- }
- }
-
- /**
* Create editable ValueData copy.
*
* @return EditableValueData
@@ -523,19 +464,19 @@
}
dataFile = otherVd.spoolFile;
}
- else if (transnt.delegate instanceof FileStreamPersistedValueData)
+ else if (transnt.delegate instanceof FilePersistedValueData)
{
// if other persistent as delegated - check file
- dataFile = ((FileStreamPersistedValueData)transnt.delegate).getFile();
+ dataFile = ((FilePersistedValueData)transnt.delegate).getFile();
}
else
{
return false;
}
}
- else if (another instanceof FileStreamPersistedValueData)
+ else if (another instanceof FilePersistedValueData)
{
- FileStreamPersistedValueData persisted = (FileStreamPersistedValueData)another;
+ FilePersistedValueData persisted = (FilePersistedValueData)another;
// if other persistent - check file
dataFile = persisted.getFile();
@@ -701,7 +642,8 @@
}
catch (IOException e)
{
- throw new IllegalStateException(e);
+ throw new IllegalStateException("Error of spooling to temp file from " + tmpStream
+ + ". Check if stream is not consumed or is not closed.", e);
}
finally
{
@@ -716,6 +658,7 @@
}
if (this.closeTmpStream)
+ {
try
{
this.tmpStream.close();
@@ -724,6 +667,7 @@
{
LOG.error("Error of source input close.", e);
}
+ }
this.tmpStream = null;
}
}
@@ -831,18 +775,98 @@
* File
* @param deleteSpoolFile
* boolean
+ * @param closeTmpStream
+ * boolean
* @throws IOException
* if read error
*/
public TransientValueData(int orderNumber, byte[] bytes, InputStream stream, File spoolFile,
+ FileCleaner fileCleaner, int maxBufferSize, File tempDirectory, boolean deleteSpoolFile, boolean closeTmpStream)
+ throws IOException
+ {
+ this.delegate =
+ new NewValueData(orderNumber, bytes, stream, spoolFile, fileCleaner, maxBufferSize, tempDirectory,
+ deleteSpoolFile, closeTmpStream);
+ }
+
+ /**
+ * TransientValueData constructor.
+ *
+ * @param orderNumber
+ * int
+ * @param bytes
+ * byte[]
+ * @param stream
+ * InputStream
+ * @param spoolFile
+ * File
+ * @param fileCleaner
+ * FileCleaner
+ * @param maxBufferSize
+ * int
+ * @param tempDirectory
+ * File
+ * @param deleteSpoolFile
+ * boolean
+ * @throws IOException
+ * if read error
+ */
+ public TransientValueData(int orderNumber, byte[] bytes, InputStream stream, File spoolFile,
FileCleaner fileCleaner, int maxBufferSize, File tempDirectory, boolean deleteSpoolFile) throws IOException
{
this.delegate =
new NewValueData(orderNumber, bytes, stream, spoolFile, fileCleaner, maxBufferSize, tempDirectory,
- deleteSpoolFile);
+ deleteSpoolFile, true);
}
/**
+ * TransientValueData constructor for stream data.
+ *
+ * @param orderNumber
+ * int
+ * @param stream
+ * InputStream
+ * @param fileCleaner
+ * FileCleaner
+ * @param maxBufferSize
+ * int
+ * @param tempDirectory
+ * File
+ * @param deleteSpoolFile
+ * boolean
+ * @throws IOException
+ * if read error
+ */
+ public TransientValueData(int orderNumber, InputStream stream, FileCleaner fileCleaner, int maxBufferSize,
+ File tempDirectory, boolean deleteSpoolFile) throws IOException
+ {
+ this.delegate =
+ new NewValueData(orderNumber, null, stream, null, fileCleaner, maxBufferSize, tempDirectory, deleteSpoolFile,
+ true);
+ }
+
+ /**
+ * TransientValueData constructor for file data.
+ *
+ * @param orderNumber
+ * int
+ * @param spoolFile
+ * File
+ * @param fileCleaner
+ * FileCleaner
+ * @param deleteSpoolFile
+ * boolean
+ * @throws IOException
+ * if read error
+ */
+ public TransientValueData(int orderNumber, File spoolFile, FileCleaner fileCleaner, boolean deleteSpoolFile)
+ throws IOException
+ {
+ this.delegate =
+ new NewValueData(orderNumber, null, null, spoolFile, fileCleaner, -1, null, deleteSpoolFile, true);
+ }
+
+ /**
* Creates TransientValueData with incoming byte array.
* @param orderNumber
* int
@@ -1096,6 +1120,16 @@
}
/**
+ * Constructor for Persisted ValueData delegate (for transient copy).
+ *
+ * @param persistent AbstractPersistedValueData
+ */
+ public TransientValueData(AbstractPersistedValueData persistent)
+ {
+ this.delegate = persistent;
+ }
+
+ /**
* Constructor for Editable value data.
*
* @param orderNumber
@@ -1195,7 +1229,8 @@
}
/**
- * Get original stream. Can be consumed or null. For persistent operations on newly created data only.
+ * Get original stream. Can be consumed or null. <p/>
+ * WARN: method for persistent operations on modified ValueData only.
*
* @return InputStream original stream
*/
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -151,14 +151,7 @@
@Override
public TransientValueData createTransientCopy() throws RepositoryException
{
- try
- {
- return new TransientValueData(orderNumber, data, null, null, null, -1, null, false);
- }
- catch (IOException e)
- {
- throw new RepositoryException(e);
- }
+ return new TransientValueData(orderNumber, data);
}
}
Copied: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFilePersistedValueData.java (from rev 1062, jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java)
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFilePersistedValueData.java (rev 0)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFilePersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent;
+
+import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
+import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
+import org.exoplatform.services.jcr.impl.util.io.SwapFile;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * Created by The eXo Platform SAS. Implementation of FileStream ValueData secures deleting file in
+ * object finalization
+ *
+ * @author Gennady Azarenkov
+ * @version $Id: CleanableFilePersistedValueData.java 35209 2009-08-07 15:32:27Z pnedonosko $
+ */
+
+public class CleanableFilePersistedValueData extends FilePersistedValueData
+{
+
+ protected final static Log LOG = ExoLogger.getLogger("jcr.CleanableFileStreamValueData");
+
+ protected final FileCleaner cleaner;
+
+ /**
+ * CleanableFilePersistedValueData constructor.
+ * @param orderNumber
+ * int
+ * @param file
+ * SwapFile
+ * @param cleaner
+ * FileCleaner
+ */
+ public CleanableFilePersistedValueData(int orderNumber, SwapFile file, FileCleaner cleaner)
+ throws FileNotFoundException
+ {
+ super(orderNumber, file);
+ this.cleaner = cleaner;
+
+ // aquire this file
+ file.acquire(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void finalize() throws Throwable
+ {
+ try
+ {
+ // release file
+ ((SwapFile)file).release(this);
+
+ if (!file.delete())
+ {
+ cleaner.addFile(file);
+
+ if (LOG.isDebugEnabled())
+ {
+ LOG.debug("Could not remove temporary file on finalize: inUse=" + (((SwapFile)file).inUse()) + ", "
+ + file.getAbsolutePath());
+ }
+ }
+ }
+ finally
+ {
+ super.finalize();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Deprecated
+ public TransientValueData createTransientCopy() throws RepositoryException
+ {
+ return new TransientValueData(this);
+ }
+}
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CleanableFileStreamValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.dataflow.persistent;
-
-import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
-import org.exoplatform.services.jcr.impl.util.io.SwapFile;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import javax.jcr.RepositoryException;
-
-/**
- * Created by The eXo Platform SAS. Implementation of FileStream ValueData secures deleting file in
- * object finalization
- *
- * @author Gennady Azarenkov
- * @version $Id: CleanableFileStreamValueData.java 35209 2009-08-07 15:32:27Z pnedonosko $
- */
-
-public class CleanableFileStreamValueData extends FileStreamPersistedValueData
-{
-
- protected final static Log LOG = ExoLogger.getLogger("jcr.CleanableFileStreamValueData");
-
- protected final FileCleaner cleaner;
-
- /**
- * CleanableFileStreamValueData constructor.
- *
- * @param file
- * SwapFile
- * @param orderNumber
- * int
- * @param cleaner
- * FileCleaner
- */
- public CleanableFileStreamValueData(SwapFile file, int orderNumber, FileCleaner cleaner)
- throws FileNotFoundException
- {
- super(file, orderNumber);
- this.cleaner = cleaner;
-
- // aquire this file
- file.acquire(this);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void finalize() throws Throwable
- {
- try
- {
- // release file
- ((SwapFile)file).release(this);
-
- if (!file.delete())
- {
- cleaner.addFile(file);
-
- if (LOG.isDebugEnabled())
- {
- LOG.debug("Could not remove temporary file on finalize: inUse=" + (((SwapFile)file).inUse()) + ", "
- + file.getAbsolutePath());
- }
- }
- }
- finally
- {
- super.finalize();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public TransientValueData createTransientCopy() throws RepositoryException
- {
- try
- {
- return new FileStreamTransientValueData(file, orderNumber, cleaner, true);
- }
- catch (IOException e)
- {
- throw new RepositoryException(e);
- }
- }
-}
Copied: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FilePersistedValueData.java (from rev 1062, jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java)
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FilePersistedValueData.java (rev 0)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FilePersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent;
+
+import org.exoplatform.services.jcr.datamodel.ValueData;
+import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.FileChannel;
+import java.nio.channels.WritableByteChannel;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * @author Gennady Azarenkov
+ * @version $Id$
+ */
+
+public class FilePersistedValueData extends AbstractPersistedValueData
+{
+
+ protected File file;
+
+ protected FileChannel channel;
+
+ /**
+ * FilePersistedValueData constructor.
+ * @param orderNumber int
+ * @param file File
+ */
+ public FilePersistedValueData(int orderNumber, File file)
+ {
+ super(orderNumber);
+ this.file = file;
+ }
+
+ public File getFile() throws IOException
+ {
+ return file;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getAsStream() throws IOException
+ {
+ return new FileInputStream(file);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @throws IOException
+ */
+ public byte[] getAsByteArray() throws IllegalStateException, IOException
+ {
+ return fileToByteArray();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getLength()
+ {
+ return file.length();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long read(OutputStream stream, long length, long position) throws IOException
+ {
+ if (channel == null)
+ {
+ channel = new FileInputStream(file).getChannel();
+ }
+
+ // validation
+ if (position >= channel.size() && position > 0)
+ {
+ throw new IOException("Position " + position + " out of value size " + channel.size());
+ }
+
+ if (position + length >= channel.size())
+ {
+ length = channel.size() - position;
+ }
+
+ MappedByteBuffer bb = channel.map(FileChannel.MapMode.READ_ONLY, position, length);
+
+ WritableByteChannel ch;
+ if (stream instanceof FileOutputStream)
+ {
+ ch = ((FileOutputStream)stream).getChannel();
+ }
+ else
+ {
+ ch = Channels.newChannel(stream);
+ }
+ ch.write(bb);
+ ch.close();
+
+ return length;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isByteArray()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(ValueData another)
+ {
+ if (this == another)
+ {
+ return true;
+ }
+
+ if (!isByteArray() && !another.isByteArray())
+ {
+ // compare files
+ try
+ {
+ if (another instanceof TransientValueData)
+ {
+ // if another transient
+ return file.equals(((TransientValueData)another).getSpoolFile());
+ }
+ else if (another instanceof FilePersistedValueData)
+ {
+ // both from peristent layer
+ return file.equals(((FilePersistedValueData)another).getFile());
+ }
+ }
+ catch (IOException e)
+ {
+ LOG.error("Read error", e);
+ return false;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Deprecated
+ public TransientValueData createTransientCopy() throws RepositoryException
+ {
+ return new TransientValueData(this);
+ }
+
+ /**
+ * Convert File to byte array. <br/>
+ * WARNING: Potential lack of memory due to call getAsByteArray() on stream data.
+ *
+ * @return byte[] bytes array
+ */
+ private byte[] fileToByteArray() throws IOException
+ {
+ // TODO do refactor of work with NIO
+
+ FileChannel fch = new FileInputStream(file).getChannel();
+
+ try
+ {
+ ByteBuffer bb = ByteBuffer.allocate((int)fch.size());
+ fch.read(bb);
+ if (bb.hasArray())
+ {
+ return bb.array();
+ }
+ else
+ {
+ // impossible code in most cases, as we use heap backed buffer
+ byte[] tmpb = new byte[bb.capacity()];
+ bb.get(tmpb);
+ return tmpb;
+ }
+ }
+ finally
+ {
+ fch.close();
+ }
+ }
+}
Property changes on: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FilePersistedValueData.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -1,226 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.dataflow.persistent;
-
-import org.exoplatform.services.jcr.datamodel.ValueData;
-import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.Channels;
-import java.nio.channels.FileChannel;
-import java.nio.channels.WritableByteChannel;
-
-import javax.jcr.RepositoryException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * @author Gennady Azarenkov
- * @version $Id$
- */
-
-public class FileStreamPersistedValueData extends AbstractPersistedValueData
-{
-
- protected File file;
-
- protected FileChannel channel;
-
- /**
- * FileStreamPersistedValueData constructor.
- *
- * @param file File
- * @param orderNumber int
- */
- public FileStreamPersistedValueData(File file, int orderNumber)
- {
- super(orderNumber);
- this.file = file;
- }
-
- public File getFile() throws IOException
- {
- return file;
- }
-
- /**
- * {@inheritDoc}
- */
- public InputStream getAsStream() throws IOException
- {
- return new FileInputStream(file);
- }
-
- /**
- * {@inheritDoc}
- * @throws IOException
- */
- public byte[] getAsByteArray() throws IllegalStateException, IOException
- {
- return fileToByteArray();
- }
-
- /**
- * {@inheritDoc}
- */
- public long getLength()
- {
- return file.length();
- }
-
- /**
- * {@inheritDoc}
- */
- public long read(OutputStream stream, long length, long position) throws IOException
- {
- if (channel == null)
- {
- channel = new FileInputStream(file).getChannel();
- }
-
- // validation
- if (position >= channel.size() && position > 0)
- {
- throw new IOException("Position " + position + " out of value size " + channel.size());
- }
-
- if (position + length >= channel.size())
- {
- length = channel.size() - position;
- }
-
- MappedByteBuffer bb = channel.map(FileChannel.MapMode.READ_ONLY, position, length);
-
- WritableByteChannel ch;
- if (stream instanceof FileOutputStream)
- {
- ch = ((FileOutputStream)stream).getChannel();
- }
- else
- {
- ch = Channels.newChannel(stream);
- }
- ch.write(bb);
- ch.close();
-
- return length;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isByteArray()
- {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean equals(ValueData another)
- {
- if (this == another)
- {
- return true;
- }
-
- if (!isByteArray() && !another.isByteArray())
- {
- // compare files
- try
- {
- if (another instanceof TransientValueData)
- {
- // if another transient
- return file.equals(((TransientValueData)another).getSpoolFile());
- }
- else if (another instanceof FileStreamPersistedValueData)
- {
- // both from peristent layer
- return file.equals(((FileStreamPersistedValueData)another).getFile());
- }
- }
- catch (IOException e)
- {
- LOG.error("Read error", e);
- return false;
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Deprecated
- public TransientValueData createTransientCopy() throws RepositoryException
- {
- try
- {
- return new FileStreamTransientValueData(file, orderNumber);
- }
- catch (IOException e)
- {
- throw new RepositoryException(e);
- }
- }
-
- /**
- * Convert File to byte array. <br/>
- * WARNING: Potential lack of memory due to call getAsByteArray() on stream data.
- *
- * @return byte[] bytes array
- */
- private byte[] fileToByteArray() throws IOException
- {
- // TODO do refactor of work with NIO
-
- FileChannel fch = new FileInputStream(file).getChannel();
-
- try
- {
- ByteBuffer bb = ByteBuffer.allocate((int)fch.size());
- fch.read(bb);
- if (bb.hasArray())
- {
- return bb.array();
- }
- else
- {
- // impossible code in most cases, as we use heap backed buffer
- byte[] tmpb = new byte[bb.capacity()];
- bb.get(tmpb);
- return tmpb;
- }
- }
- finally
- {
- fch.close();
- }
- }
-}
Deleted: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/FileStreamTransientValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-/**
- *
- */
-/*
- * Copyright (C) 2003-2009 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.dataflow.persistent;
-
-import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.jcr.RepositoryException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>
- *
- * NOT USEFUL!
- *
- * Class for Persistent ValueData in Session (transient) level. Methods getSpoolFile(),
- * setSpoolFile() should don't get/set persistent file. Method createTransientCopy() returns this
- * object.
- *
- * <br/>
- * Date: 09.06.2009
- *
- * @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter Nedonosko</a>
- * @version $Id$
- */
-@Deprecated
-public class FileStreamTransientValueData extends TransientValueData
-{
-
- /**
- * FileStreamTransientValueData constructor.
- *
- * @param file
- * File from Value storage
- * @param orderNumber
- * int
- * @throws IOException
- * if error occurs
- */
- FileStreamTransientValueData(File file, int orderNumber) throws IOException
- {
- super(orderNumber, null, null, file, null, -1, null, false);
- }
-
- /**
- * FileStreamTransientValueData constructor for swap files. Swap file it's a temp file used by
- * container for BLOBs read from database or any remote storage.
- *
- * @param file
- * File from storage
- * @param orderNumber
- * int
- * @param fileCleaner
- * FileCleaner
- * @param deleteFile
- * boolean, if true file will be deleted after the FileStreamTransientValueData will be
- * GCed.
- * @throws IOException
- * if error occurs
- */
- FileStreamTransientValueData(File file, int orderNumber, FileCleaner fileCleaner, boolean deleteFile)
- throws IOException
- {
- super(orderNumber, null, null, file, fileCleaner, -1, null, deleteFile);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public File getSpoolFile()
- {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public long getLength()
- {
- return this.delegate.getLength();
- }
-}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -35,7 +35,7 @@
* @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter Nedonosko</a>
* @version $Id$
*/
-public class StreamPersistedValueData extends FileStreamPersistedValueData
+public class StreamPersistedValueData extends FilePersistedValueData
{
protected InputStream stream;
@@ -43,20 +43,73 @@
protected File tempFile;
/**
- * StreamPersistedValueData constructor.
+ * StreamPersistedValueData constructor for stream data.
*
- * @param file File
+ * @param orderNumber int
* @param stream InputStream
+ */
+ public StreamPersistedValueData(int orderNumber, InputStream stream)
+ {
+ this(orderNumber, stream, null);
+ }
+
+ /**
+ * StreamPersistedValueData constructor for data spooled to temp file.
+ *
* @param orderNumber int
+ * @param tempFile File
*/
- public StreamPersistedValueData(File file, File tempFile, InputStream stream, int orderNumber)
+ public StreamPersistedValueData(int orderNumber, File tempFile)
{
- super(file, orderNumber);
- this.tempFile = tempFile;
+ this(orderNumber, tempFile, null);
+ }
+
+ /**
+ * StreamPersistedValueData constructor for stream data with know destenation file.
+ * <p/>
+ * Destenation file reserved for use in JBC impl.
+ *
+ * @param orderNumber int
+ * @param stream InputStream
+ * @param destFile File
+ */
+ public StreamPersistedValueData(int orderNumber, InputStream stream, File destFile)
+ {
+ super(orderNumber, destFile);
+ this.tempFile = null;
this.stream = stream;
}
/**
+ * StreamPersistedValueData constructor for data spooled to temp file with know destenation file.
+ * <p/>
+ * Destenation file reserved for use in JBC impl.
+ *
+ * @param orderNumber int
+ * @param tempFile File
+ */
+ public StreamPersistedValueData(int orderNumber, File tempFile, File destFile)
+ {
+ super(orderNumber, destFile);
+ this.tempFile = tempFile;
+ this.stream = null;
+ }
+//
+// /**
+// * StreamPersistedValueData constructor for spooled file.
+// *
+// * @param file File
+// * @param stream InputStream
+// * @param orderNumber int
+// */
+// public StreamPersistedValueData(File file, File tempFile, InputStream stream, int orderNumber)
+// {
+// super(orderNumber, file);
+// this.tempFile = tempFile;
+// this.stream = stream;
+// }
+
+ /**
* Return original data stream or null. <br/>
* For persistent transformation from non-spooled TransientValueData to persistent layer.<br/>
* WARN: after the stream will be consumed it will not contains data anymore.
@@ -153,24 +206,6 @@
}
}
- // TODO
- // @Override
- // public boolean equals(Object obj)
- // {
- // if (super.equals(obj))
- // {
- // return true;
- // }
- // else
- // {
- // // we can check stream and temp file additional
- // if (tempFile != null)
- // {
- //
- // }
- // }
- // }
-
/**
* {@inheritDoc}
*/
@@ -178,15 +213,7 @@
@Deprecated
public TransientValueData createTransientCopy() throws RepositoryException
{
- // TODO check logic
- try
- {
- return new FileStreamTransientValueData(file, orderNumber);
- }
- catch (IOException e)
- {
- throw new RepositoryException(e);
- }
+ return new TransientValueData(this);
}
/**
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -39,7 +39,6 @@
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.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.storage.SystemDataContainerHolder;
import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
@@ -386,7 +385,7 @@
if (vd instanceof TransientValueData)
{
TransientValueData tvd = (TransientValueData)vd;
- AbstractPersistedValueData pvd;
+ ValueData pvd;
if (vd.isByteArray())
{
@@ -396,14 +395,21 @@
else
{
// TODO ask dest file from VS provider, can be null after
- // TODO what if JDBC spool used, i.e. without VS = storage will setPersistedFile()
// TODO for JBC case, the storage connection will evict the replicated Value to read it from the DB
File destFile = null;
// TODO review TransientValueData logic about spool file and stream
- pvd =
- new StreamPersistedValueData(destFile, tvd.getSpoolFile(), tvd.getSpoolFile() == null
- ? tvd.getOriginalStream() : null, i);
+ if (tvd.getSpoolFile() != null)
+ {
+ // spooled to temp file
+ pvd = new StreamPersistedValueData(i, tvd.getSpoolFile());
+ }
+ else
+ {
+ // with original stream
+ pvd = new StreamPersistedValueData(i, tvd.getOriginalStream());
+ }
+
values.add(pvd);
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -23,7 +23,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.UnknownClassIdException;
import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.SpoolFile;
@@ -118,14 +118,14 @@
// TODO optimize writeToFile - use channels or streams
writeToFile(in, sf, length);
holder.put(id, sf);
- return new FileStreamPersistedValueData(sf, orderNumber);
+ return new FilePersistedValueData(orderNumber, sf);
}
else
{
sf.acquire(this); // TODO workaround for AsyncReplication test
try
{
- AbstractPersistedValueData vd = new FileStreamPersistedValueData(sf, orderNumber);
+ AbstractPersistedValueData vd = new FilePersistedValueData(orderNumber, sf);
// skip data in input stream
if (in.skip(length) != length)
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataWriter.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -22,7 +22,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.SerializationConstants;
import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.util.IdGenerator;
import java.io.IOException;
@@ -66,7 +66,7 @@
else
{
// write file content
- FileStreamPersistedValueData streamed = (FileStreamPersistedValueData)vd;
+ FilePersistedValueData streamed = (FilePersistedValueData)vd;
InputStream in = streamed.getAsStream();
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -34,7 +34,7 @@
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.CleanableFileStreamValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.CleanableFilePersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException;
import org.exoplatform.services.jcr.impl.storage.value.ValueStorageNotFoundException;
@@ -1829,7 +1829,7 @@
}
if (buffer == null)
- return new CleanableFileStreamValueData(swapFile, orderNumber, swapCleaner);
+ return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
return new ByteArrayPersistedValueData(buffer, orderNumber);
}
@@ -1922,6 +1922,7 @@
StreamPersistedValueData streamData = (StreamPersistedValueData)vd;
stream = streamData.getStream();
+ // TODO spool on JDBC driver read - multiplexing the data to two stores, database and spool file, with one read.
SwapFile swapFile = swapValueData(cid, i, data.getPersistedVersion(), stream);
long vlen = swapFile.length();
@@ -1942,6 +1943,7 @@
+ ". Property " + data.getQPath().getAsString());
}
+ // set persistent file to ValueData, will be available for saving Property.
streamData.setPersistedFile(swapFile);
}
storageId = null;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -20,7 +20,7 @@
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -79,7 +79,7 @@
if (fileSize > maxBufferSize)
{
- return new FileStreamPersistedValueData(file, orderNum);
+ return new FilePersistedValueData(orderNum, file);
}
else
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCleanableFileStreamValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCleanableFileStreamValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCleanableFileStreamValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -51,7 +51,7 @@
private FileCleaner testCleaner;
- private CleanableFileStreamValueData cleanableValueData;
+ private CleanableFilePersistedValueData cleanableValueData;
private static class TestSwapFile extends SwapFile
{
@@ -91,7 +91,7 @@
fout.close();
sf.spoolDone();
- cleanableValueData = new CleanableFileStreamValueData(sf, 1, testCleaner);
+ cleanableValueData = new CleanableFilePersistedValueData(1, sf, testCleaner);
}
@Override
@@ -138,8 +138,8 @@
System.gc();
Thread.sleep(CLEANER_TIMEOUT / 2);
- CleanableFileStreamValueData cfvd2 =
- new CleanableFileStreamValueData(SwapFile.get(parentDir, FILE_NAME), 1, testCleaner);
+ CleanableFilePersistedValueData cfvd2 =
+ new CleanableFilePersistedValueData(1, SwapFile.get(parentDir, FILE_NAME), testCleaner);
assertTrue(testFile.exists());
cleanableValueData = null; // CleanableVD dies but another instance points swapped file
@@ -230,8 +230,8 @@
System.gc();
// file shared with third CleanableVD, i.e. file still exists (aquired by TransientVD)
- CleanableFileStreamValueData cfvd2 =
- new CleanableFileStreamValueData(SwapFile.get(parentDir, FILE_NAME), 1, testCleaner);
+ CleanableFilePersistedValueData cfvd2 =
+ new CleanableFilePersistedValueData(1, SwapFile.get(parentDir, FILE_NAME), testCleaner);
assertTrue(testFile.exists());
trvd = null; // TransientVD dies
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/JCRSerializationVSJavaSerializationTestLoad.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -20,7 +20,7 @@
import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import java.io.ByteArrayInputStream;
@@ -60,7 +60,7 @@
for (int i = 0; i < nodes; i++)
{
bin = new ByteArrayInputStream(createBLOBTempData(20));
- list.add(new StreamPersistedValueData(null, null, bin, 0));
+ list.add(new StreamPersistedValueData(0, bin));
}
Iterator<AbstractPersistedValueData> it;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableFileIOChannelTestBase.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableFileIOChannelTestBase.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/CASableFileIOChannelTestBase.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -21,7 +21,7 @@
import org.exoplatform.services.jcr.JcrImplBaseTest;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import org.exoplatform.services.jcr.impl.storage.value.cas.RecordAlreadyExistsException;
import org.exoplatform.services.jcr.impl.storage.value.cas.RecordNotFoundException;
@@ -112,7 +112,7 @@
FileIOChannel fch = openCASChannel(digestType);
String propertyId = IdGenerator.generate();
- ValueData value = new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0);
+ ValueData value = new StreamPersistedValueData(0, new FileInputStream(testFile));
fch.write(propertyId, value);
fch.commit();
@@ -143,7 +143,7 @@
// prepare
String propertyId = IdGenerator.generate();
- ValueData value = new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0);
+ ValueData value = new StreamPersistedValueData(0, new FileInputStream(testFile));
fch.write(propertyId, value);
fch.commit();
@@ -152,7 +152,7 @@
try
{
fch = openCASChannel(digestType);
- fch.write(new String(propertyId), new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0));
+ fch.write(new String(propertyId), new StreamPersistedValueData(0, new FileInputStream(testFile)));
fch.commit();
fail("RecordAlreadyExistsException should be thrown, record exists");
@@ -182,10 +182,10 @@
String propertyId = IdGenerator.generate();
try
{
- ValueData value = new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0);
+ ValueData value = new StreamPersistedValueData(0, new FileInputStream(testFile));
fch.write(propertyId, value);
fch.delete(propertyId);
- fch.write(propertyId, new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0));
+ fch.write(propertyId, new StreamPersistedValueData(0, new FileInputStream(testFile)));
fch.commit();
// long initialSize = calcDirSize(rootDir);
@@ -209,7 +209,7 @@
FileIOChannel fch = openCASChannel(digestType);
String propertyId = IdGenerator.generate();
- ValueData value = new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0);
+ ValueData value = new StreamPersistedValueData(0, new FileInputStream(testFile));
fch.write(propertyId, value);
fch.commit();
@@ -232,7 +232,7 @@
FileIOChannel fch = openCASChannel(digestType);
String propertyId = IdGenerator.generate();
- ValueData value = new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0);
+ ValueData value = new StreamPersistedValueData(0, new FileInputStream(testFile));
fch.write(propertyId, value);
fch.commit();
@@ -316,7 +316,7 @@
for (int i = 0; i < 20; i++)
{
- fch.write(propertyId, new StreamPersistedValueData(null, null, new FileInputStream(testFile), i));
+ fch.write(propertyId, new StreamPersistedValueData(i, new FileInputStream(testFile)));
}
fch.commit();
@@ -346,7 +346,7 @@
{
File f = createBLOBTempFile(300);
addedSize += f.length();
- fch.write(propertyId, new StreamPersistedValueData(null, null, new FileInputStream(f), i));
+ fch.write(propertyId, new StreamPersistedValueData(i, new FileInputStream(testFile)));
}
fch.commit();
@@ -375,7 +375,7 @@
propertyId = IdGenerator.generate();
FileIOChannel fch = openCASChannel(digestType);
- fch.write(propertyId, new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0));
+ fch.write(propertyId, new StreamPersistedValueData(0, new FileInputStream(testFile)));
fch.commit();
}
@@ -404,7 +404,7 @@
addedSize += f.length();
FileIOChannel fch = openCASChannel(digestType);
- fch.write(propertyId, new StreamPersistedValueData(null, null, new FileInputStream(f), 0));
+ fch.write(propertyId, new StreamPersistedValueData(i, new FileInputStream(f)));
fch.commit();
}
@@ -434,7 +434,7 @@
propertyId = pid;
FileIOChannel fch = openCASChannel(digestType);
- fch.write(pid, new StreamPersistedValueData(null, null, new FileInputStream(testFile), 0));
+ fch.write(pid, new StreamPersistedValueData(0, new FileInputStream(testFile)));
fch.commit();
}
@@ -475,7 +475,7 @@
addedSize += (fileSize = f.length());
FileIOChannel fch = openCASChannel(digestType);
- fch.write(pid, new StreamPersistedValueData(null, null, new FileInputStream(f), 0));
+ fch.write(pid, new StreamPersistedValueData(i, new FileInputStream(f)));
fch.commit();
}
@@ -515,7 +515,7 @@
File f = createBLOBTempFile(450);
addedSize += (m1fileSize = f.length());
- StreamPersistedValueData v = new StreamPersistedValueData(null, null, new FileInputStream(f), i);
+ StreamPersistedValueData v = new StreamPersistedValueData(i, new FileInputStream(testFile));
if (i == 1)
sharedValue = v;
@@ -537,7 +537,7 @@
if (i == 2)
{
// use shared
- sharedValue = new StreamPersistedValueData(null, null, sharedValue.getAsStream(), i);
+ sharedValue = new StreamPersistedValueData(i, sharedValue.getAsStream());
v = sharedValue;
}
else
@@ -546,7 +546,7 @@
m2filesCount++;
File f = createBLOBTempFile(350);
addedSize += (m2fileSize = f.length()); // add size
- v = new StreamPersistedValueData(null, null, new FileInputStream(f), i);
+ v = new StreamPersistedValueData(i, new FileInputStream(testFile));
}
fch.write(property2MultivaluedId, v);
}
@@ -555,7 +555,7 @@
// add some single valued properties, two new property will have shared value too
String property1Id = null;
String property2Id = null;
- sharedValue = new StreamPersistedValueData(null, null, sharedValue.getAsStream(), 0);
+ sharedValue = new StreamPersistedValueData(0, sharedValue.getAsStream());
for (int i = 0; i < 10; i++)
{
String pid = IdGenerator.generate();
@@ -574,7 +574,7 @@
{
File f = createBLOBTempFile(425);
addedSize += f.length();
- v = new StreamPersistedValueData(null, null, new FileInputStream(f), 0);
+ v = new StreamPersistedValueData(i, new FileInputStream(f));
}
FileIOChannel vfch = openCASChannel(digestType);
vfch.write(pid, v);
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -23,7 +23,7 @@
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.storage.value.ValueDataResourceHolder;
import java.io.ByteArrayInputStream;
@@ -116,7 +116,7 @@
// max buffer size = 5 - so File will be created
ValueData vd = FileValueIOUtil.testReadValue(file, 0, 5);
- assertTrue(vd instanceof FileStreamPersistedValueData);
+ assertTrue(vd instanceof FilePersistedValueData);
assertFalse(vd.isByteArray());
assertEquals(10, vd.getLength());
assertEquals(0, vd.getOrderNumber());
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -21,8 +21,8 @@
import junit.framework.TestCase;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.CleanableFileStreamValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.CleanableFilePersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.storage.value.fs.Probe;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.SwapFile;
@@ -64,7 +64,7 @@
out.write(buf);
out.close();
- FileStreamPersistedValueData vd = new FileStreamPersistedValueData(file, 0);
+ FilePersistedValueData vd = new FilePersistedValueData(0, file);
assertFalse(vd.isByteArray());
assertEquals(10, vd.getLength());
assertEquals(0, vd.getOrderNumber());
@@ -91,7 +91,7 @@
out.write(buf);
out.close();
- CleanableFileStreamValueData vd = new CleanableFileStreamValueData(file, 0, new FileCleaner(1000, true));
+ CleanableFilePersistedValueData vd = new CleanableFilePersistedValueData(0, file, new FileCleaner(1000, true));
assertTrue(file.exists());
vd = null;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java 2009-12-15 16:57:58 UTC (rev 1070)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/RemoveVDTest.java 2009-12-15 17:08:54 UTC (rev 1071)
@@ -23,7 +23,7 @@
import org.exoplatform.services.jcr.dataflow.serialization.UnknownClassIdException;
import org.exoplatform.services.jcr.impl.dataflow.AbstractPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.FileStreamPersistedValueData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.FilePersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.StreamPersistedValueData;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectReaderImpl;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl;
@@ -51,7 +51,7 @@
File f = this.createBLOBTempFile("tempFile", 300);
- FileStreamPersistedValueData vd = new FileStreamPersistedValueData(f, 0);
+ FilePersistedValueData vd = new FilePersistedValueData(0, f);
// vd.setMaxBufferSize(200*1024);
// assertNull(vd.getFile()); // not spooling by default until getAsStream() will be call
@@ -69,12 +69,12 @@
// read first time
ObjectReader or = new ObjectReaderImpl(new FileInputStream(serf));
- FileStreamPersistedValueData vd1 = null;
+ FilePersistedValueData vd1 = null;
PersistedValueDataReader vdr = new PersistedValueDataReader(fileCleaner, maxBufferSize, holder);
try
{
- vd1 = (FileStreamPersistedValueData)vdr.read(or);
+ vd1 = (FilePersistedValueData)vdr.read(or);
}
catch (UnknownClassIdException e)
{
@@ -85,11 +85,11 @@
// read second time
or = new ObjectReaderImpl(new FileInputStream(serf));
- FileStreamPersistedValueData vd2 = null;
+ FilePersistedValueData vd2 = null;
try
{
- vd2 = (FileStreamPersistedValueData)vdr.read(or);
+ vd2 = (FilePersistedValueData)vdr.read(or);
}
catch (UnknownClassIdException e)
{
16 years, 7 months
exo-jcr SVN: r1070 - in kernel/branches/config-branch/exo.kernel.container/src: main/java/org/exoplatform/container/jmx and 5 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-15 11:57:58 -0500 (Tue, 15 Dec 2009)
New Revision: 1070
Added:
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml
kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml
Modified:
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
Log:
- more unit testing
- actually fix bugs
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/RootContainer.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -420,6 +420,7 @@
}
catch (Exception e)
{
+ e.printStackTrace();
log.error("Could not build root container", e);
return null;
}
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ExoModelMBean.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -173,6 +173,12 @@
//
+
+ public ManagementContext getManagementContext()
+ {
+ return context;
+ }
+
public Object getManagedResource()
{
return mr;
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManageableContainer.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -19,6 +19,7 @@
package org.exoplatform.container.jmx;
import org.exoplatform.container.CachingContainer;
+import org.exoplatform.management.ManagementContext;
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoContainer;
import org.picocontainer.PicoRegistrationException;
@@ -98,10 +99,16 @@
if (parentManagementContext != null)
{
managementContext = new ManagementContextImpl(parentManagementContext, new HashMap<String, String>());
+ managementContext.container = this;
}
}
}
+ public ManagementContext getManagementContext()
+ {
+ return managementContext;
+ }
+
public final MBeanServer getMBeanServer()
{
return managementContext != null ? managementContext.server : null;
Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/jmx/ManagementContextImpl.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -67,6 +67,10 @@
public ManagementContextImpl(MBeanServer server, Map<String, String> scopingProperties)
{
+ if (server == null)
+ {
+ throw new NullPointerException();
+ }
this.registrations = new HashMap<Object, ObjectName>();
this.parent = null;
this.scopingProperties = scopingProperties;
@@ -75,12 +79,21 @@
public ManagementContextImpl(ManagementContextImpl parent, Map<String, String> scopingProperties)
{
+ if (parent == null)
+ {
+ throw new NullPointerException();
+ }
this.registrations = new HashMap<Object, ObjectName>();
this.parent = parent;
this.scopingProperties = scopingProperties;
this.server = parent.server;
}
+ public ManagementContext getParent()
+ {
+ return parent;
+ }
+
public void register(Object o)
{
ObjectName name = manageMBean(o);
@@ -279,4 +292,10 @@
}
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ManagementContextImpl[container=" + container + "]";
+ }
}
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/RootContainerBootstrap.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -16,9 +16,11 @@
*/
package org.exoplatform.container;
+import junit.framework.AssertionFailedError;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import java.lang.reflect.Field;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
@@ -32,8 +34,25 @@
public static RootContainer bootstrap(URL configurationURL, String... profiles)
{
+ // Must clear the top container first otherwise it's not going to work well
+ // it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
+ // and this is for unit testing
try
{
+ Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
+ topContainerField.setAccessible(true);
+ topContainerField.set(null, null);
+ }
+ catch (Exception e)
+ {
+ AssertionFailedError err = new AssertionFailedError();
+ err.initCause(e);
+ throw err;
+ }
+
+ // Create a root container manually
+ try
+ {
RootContainer container = new RootContainer();
ConfigurationManager manager = new ConfigurationManagerImpl(new HashSet<String>(Arrays.asList(profiles)));
manager.addConfiguration(configurationURL);
Modified: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 16:34:43 UTC (rev 1069)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/AbstractTestContainer.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -20,10 +20,15 @@
import junit.framework.TestCase;
+import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.RootContainer;
import org.exoplatform.container.RootContainerBootstrap;
+import java.io.IOException;
import java.net.URL;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -39,4 +44,41 @@
return RootContainerBootstrap.bootstrap(url);
}
+ public PortalContainer createPortalContainer(RootContainer container, String name, String relativeConfigurationFile)
+ {
+ final URL url = getClass().getResource(relativeConfigurationFile);
+ ClassLoader cl = new ClassLoader(Thread.currentThread().getContextClassLoader())
+ {
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException
+ {
+ if ("conf/portal/configuration.xml".equals(name))
+ {
+ return Collections.enumeration(Arrays.asList(url));
+ }
+ else if ("conf/portal/test-configuration.xml".equals(name))
+ {
+ return Collections.enumeration(Collections.<URL>emptyList());
+ }
+ else
+ {
+ return super.getResources(name);
+ }
+ }
+ };
+
+ //
+ Thread.currentThread().setContextClassLoader(cl);
+
+ //
+ try
+ {
+ return container.getPortalContainer(name);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(null);
+ }
+ }
+
}
Added: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/TestPortalContainerManagedIntegration.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.jmx;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.jmx.support.SimpleManagementAware;
+import org.exoplatform.container.support.ContainerBuilder;
+
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestPortalContainerManagedIntegration extends AbstractTestContainer
+{
+
+ public void testManagementContext()
+ {
+ URL rootURL = TestPortalContainerManagedIntegration.class.getResource("root-configuration.xml");
+ URL portalURL = TestPortalContainerManagedIntegration.class.getResource("portal-configuration.xml");
+
+ //
+ RootContainer root = new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
+ ManagementContextImpl rootManagementContext = (ManagementContextImpl)root.getManagementContext();
+
+ //
+ PortalContainer portal = PortalContainer.getInstance();
+ ManagementContextImpl portalManagementContext = (ManagementContextImpl)portal.getManagementContext();
+ assertSame(root.getManagementContext(), portalManagementContext.getParent());
+ assertSame(portal, portalManagementContext.findContainer());
+
+ //
+ SimpleManagementAware rootManagementAware = (SimpleManagementAware)root.getComponentInstance("RootManagementAware");
+ ManagementContextImpl rootManagementAwareContext = (ManagementContextImpl)((ExoModelMBean)rootManagementAware.context).getManagementContext();
+ assertSame(rootManagementContext, rootManagementAwareContext.getParent());
+
+ //
+ SimpleManagementAware portalManagementAware = (SimpleManagementAware)portal.getComponentInstance("PortalManagementAware");
+ ManagementContextImpl portalManagementAwareContext = (ManagementContextImpl)((ExoModelMBean)portalManagementAware.context).getManagementContext();
+ assertSame(portalManagementContext, portalManagementAwareContext.getParent());
+ }
+
+}
Added: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/jmx/support/SimpleManagementAware.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.jmx.support;
+
+import org.exoplatform.management.ManagementAware;
+import org.exoplatform.management.ManagementContext;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.NamingContext;
+import org.exoplatform.management.jmx.annotations.Property;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+@Managed
+@NameTemplate(@Property(key = "name", value = "SimpleManagementAware"))
+public class SimpleManagementAware implements ManagementAware
+{
+
+ public ManagementContext context;
+
+ public void setContext(ManagementContext context)
+ {
+ this.context = context;
+ }
+}
Added: kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/java/org/exoplatform/container/support/ContainerBuilder.java 2009-12-15 16:57:58 UTC (rev 1070)
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.support;
+
+import junit.framework.AssertionFailedError;
+import org.exoplatform.commons.utils.Tools;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.RootContainer;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * An helper for building a root container and a portal container.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ContainerBuilder
+{
+
+ private ClassLoader loader;
+
+ private List<URL> configURLs;
+
+ private List<URL> portalConfigURLs;
+
+ private Set<String> profiles;
+
+ public ContainerBuilder()
+ {
+ this.loader = Thread.currentThread().getContextClassLoader();
+ this.configURLs = new ArrayList<URL>();
+ this.portalConfigURLs = new ArrayList<URL>();
+ }
+
+ public ContainerBuilder withRoot(String configPath)
+ {
+ configURLs.addAll(urls(configPath));
+ return this;
+ }
+
+ public ContainerBuilder withRoot(URL configURL)
+ {
+ configURLs.add(configURL);
+ return this;
+ }
+
+ public ContainerBuilder withPortal(String configPath)
+ {
+ portalConfigURLs.addAll(urls(configPath));
+ return this;
+ }
+
+ public ContainerBuilder withPortal(URL configURL)
+ {
+ portalConfigURLs.add(configURL);
+ return this;
+ }
+
+ private List<URL> urls(String path)
+ {
+ try
+ {
+ return Collections.list(loader.getResources(path));
+ }
+ catch (IOException e)
+ {
+ AssertionFailedError err = new AssertionFailedError();
+ err.initCause(e);
+ throw err;
+ }
+ }
+
+ public ContainerBuilder withLoader(ClassLoader loader)
+ {
+ this.loader = loader;
+ return this;
+ }
+
+ public ContainerBuilder profiledBy(String ... profiles)
+ {
+ this.profiles = Tools.set(profiles);
+ return this;
+ }
+
+ public RootContainer build()
+ {
+ try
+ {
+ return _build();
+ }
+ catch (Exception e)
+ {
+ AssertionFailedError err = new AssertionFailedError();
+ err.initCause(e);
+ throw err;
+ }
+ }
+
+ private RootContainer _build() throws Exception
+ {
+ // Must clear the top container first otherwise it's not going to work well
+ // it's a big ugly but I don't want to change anything in the ExoContainerContext class for now
+ // and this is for unit testing
+ Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
+ topContainerField.setAccessible(true);
+ topContainerField.set(null, null);
+
+ //
+ ClassLoader rootCL = new ClassLoader(loader)
+ {
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException
+ {
+ if ("conf/configuration.xml".equals(name))
+ {
+ return Collections.enumeration(configURLs);
+ }
+ else if ("conf/portal/configuration.xml".equals(name))
+ {
+ return Collections.enumeration(portalConfigURLs);
+ }
+ else if ("conf/portal/test-configuration.xml".equals(name))
+ {
+ return Collections.enumeration(Collections.<URL>emptyList());
+ }
+ else
+ {
+ return super.getResources(name);
+ }
+ }
+ };
+
+ //
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+
+ // Boot root container
+ RootContainer root;
+ try
+ {
+ Thread.currentThread().setContextClassLoader(rootCL);
+ root = RootContainer.getInstance();
+ root.getPortalContainer("portal");
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+
+ //
+ return root;
+ }
+}
Added: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/portal-configuration.xml 2009-12-15 16:57:58 UTC (rev 1070)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>PortalManagementAware</key>
+ <type>org.exoplatform.container.jmx.support.SimpleManagementAware</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Added: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/jmx/root-configuration.xml 2009-12-15 16:57:58 UTC (rev 1070)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <type>org.exoplatform.container.definition.PortalContainerConfig</type>
+ </component>
+
+ <component>
+ <key>RootManagementAware</key>
+ <type>org.exoplatform.container.jmx.support.SimpleManagementAware</type>
+ </component>
+
+</configuration>
\ No newline at end of file
16 years, 7 months
exo-jcr SVN: r1069 - in kernel/branches/mc-int-branch/exo.kernel.mc-integration: exo.kernel.mc-int and 1 other directory.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 11:34:43 -0500 (Tue, 15 Dec 2009)
New Revision: 1069
Added:
kernel/branches/mc-int-branch/exo.kernel.mc-integration/README.txt
Removed:
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/README.txt
Log:
Moved README.txt to a more prominent location
Copied: kernel/branches/mc-int-branch/exo.kernel.mc-integration/README.txt (from rev 1032, kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/README.txt)
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/README.txt (rev 0)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/README.txt 2009-12-15 16:34:43 UTC (rev 1069)
@@ -0,0 +1,144 @@
+
+JBoss Microcontainer Integration
+
+
+== What's it all about ==
+
+JBoss Microcontainer integration (MC integration for short) makes it possible to inject components deployed as MC beans into components deployed as exo-kernel service components. Exo-kernel is the bottom layer on top of which GateIn si built as a set of services. Exo-kernel uses picocontainer as extremely lightweight dependency-injection (DI) container. All eXo Platform and GateIn components are configured and deployed as exo-kernel services. When deployed to JBossAS, there is another DI container available - JBoss Microcontainer which is the bottom layer through which all JBossAS service components are configured and deploy. MC Integration makes it possible apply JBoss Microcontainer dependency-injection to GateIn components deployed through exo-kernel.
+
+There is no support for MC integration in Tomcat deployment. If a component annotated with @InterceptMC is deployed, a warning is logged, but the component will be deployed anyway - without injections being applied.
+
+
+== How to use ==
+
+
+There is an annotation @InterceptMC, that you annotate your service component with, to turn on MC integration for that component. MC integration only works in JBossAS, so any components that rely on it have to provide alternative injection mechanisms when deployed in Tomcat or somewhere else (i.e. using exo-kernel configuration for injections), or wire up components manually - hardcoded in a component that does just that.
+
+Sometimes you may want to inject JBossAS components per service instance. If you annotate a class, then all instances of this class will share the same configuration, you can't have one instance of the class having one configuration, and another instance of the same class having a different configuration.
+
+There is an xml file based configuration mechanism that allows you to enable MC integration for a service (per class, as well as per instance), and configure injection points and injected values.
+
+For an example of MC integration by using annotations see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+For an example of MC integration by using external configuration see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+Both these examples use exo-kernel configuration file for creation of service instances: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+That's eXo kernel configuration file, with eXo configurator specific syntax, used to configure DI performed by eXo kernel when configuring and instantiating service components. All GateIn services are configured through this.
+
+
+The external configuration example also uses injection configuration file: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
+
+The configuration format is the same as for jboss-beans.xml files. With a few exception:
+ - 'bean' element's 'name' attribute refers to configuration.xml 'component' element's 'key' attribute
+ - elements for aop configuration, constructor injections, and many others have no effect
+
+Annotation configuration in mc-int-config.xml overrides any compiled annotations on classes. That means, every instance of the same service class can be specifically targeted for MC injections, and any existing hardwired class annotation can be nullified through configuration.
+
+Only when a component is marked with @InterceptMC annotation, will it have its mc-kernel injection annotations process by mc-kernel, as part of MC integration.
+
+
+== MC integration demo ==
+
+
+The demo demonstrates POJO creation via exo-kernel and use of MC injection annotations (or xml configuration) to have some services injected into our exo-kernel-deployed POJO by MC.
+
+We have three service objects - InjectedBean, InjectingBean, and ExternallyControlledInjectingBean, packaged in a single jar.
+
+InjectedBeans gets instantiated by JBossAS deployer via META-INF/jboss-beans.xml. InjectingBean and ExternallyControlledInjectingBean on the other hand gets instantiated by exo-kernel via conf/configuration.xml.
+
+Exo-kernel knows nothing about InjectedBean, but because InjectingBean is annotated with @InterceptMC it is processed by MC integration logic when instantiated by exo-kernel. The processing pipes it through MC-kernel logic which processes MC-kernel injection annotations, and performs injection of components. The same goes for ExternallyControlledInjectingBean.
+
+Of course, MC-kernel knows nothing about exo-kernel service objects - it can only inject components deployed through one of JBossAS deployers that use MC-kernel to instantiate - or at least register - components.
+
+InjectingBean demonstrates several different ways in which you can perform injection of JBoss services into a component. If instead of using exo-kernel to deploy InjectingBean, you deploy it through JBossAS, these annotations will work just the same - JBossAS uses MC-kernel, and MC-kernel will process the annotations.
+
+There are many annotations used in InjectingBean.java. Apart from @InterceptMC they are all mc-kernel annotations used to configure injections.
+
+ExternallyControlledInjectingBean.java on the other hand contains no annotations at all. All injections are configured externally in conf/mc-int-config.xml.
+
+@InterceptMC is introduced by MC integration to mark classes that should be integrated with MC. Through it you can also control what kind of injections you want MC to perform. By default, field injections are disabled by MC-kernel, as they are deemed an anti-pattern for service objects - they may make your code more difficult to maintain in the long run, as you are giving up the ability to intercept the setting of the field.
+
+Service objects instantiated through exo-kernel don't become part of MC-kernel object repository. That means that dependency management can't be performed by MC-kernel, which means that all the dependencies InjectingBean needs have to be fulfilled before MC-kernel first learns about it. Usually MC-kernel makes several passes over the whole deployment (all the deployment archives), first learning about services and their dependencies, then starting up services that have no dependencies first, and services with dependencies later - when their dependencies are fulfilled.
+
+When using MC integration, we need to make sure, that all the dependencies have already been installed before exo-kernel bootstrap happens. This can be done by deploying all jboss beans as .jars containing META-INF/jboss-beans.xml in deploy dir. JBossAS deploys .jars before .wars and .ears.
+
+
+== Things to look out for ==
+
+There are several exo-kernel bootstrap points that may be used when creating your GateIn portals:
+
+Always use either:
+
+exo-kernel/exo.kernel.container: org.exoplatform.container.web.PortalContainerConfigOwner
+
+or
+
+gatein/portal/trunk/component/web: org.exoplatform.web.GenericHttpListener
+
+
+Never use PortalContainer or RootContainer before first making sure one of the above two proper GateIn initialization points are invoked.
+
+
+
+== Building and deploying ==
+
+
+ === exo-kernel ===
+
+cd $REPO/exo-jcr/kernel/branches
+svn co https://svn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch
+cd mc-int-branch
+mvn install
+
+
+ === packager ===
+
+cd $REPO/gatein/tools/packager/branches
+svn co https://svn.jboss.org/repos/gatein/tools/packager/branches/mc-integration
+cd mc-integration
+mvn install
+
+
+ === portal ===
+
+cd $REPO/gatein/portal/branches
+svn co https://svn.jboss.org/repos/gatein/portal/branches/mc-integration
+cd mc-integration
+mvn install -Dmaven.test.skip=true -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+
+
+
+ === Packaging and running GateIn with demo and integration tests deployed ===
+
+cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg
+
+FOR JBOSSAS:
+
+ mvn install -Ppkg-jbossas-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+ cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/jboss/bin
+ run
+
+FOR TOMCAT (MC integration won't work, but integration tests should pass):
+
+ mvn install -Ppkg-tomcat-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
+ cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/tomcat/bin
+ gatein run
+
+
+
+ === Running the integration tests ===
+
+cd $REPO/exo-jcr/kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/
+mvn -Ptests
+
+
+
+If you run your server on non-default IP:port use something like:
+mvn -Ptests -DforkMode=none -Dserver.host=127.0.0.1 -Dserver.port=8000
+
+(Don't forget -DforkMode=none otherwise system properties won't get propagated to the test class)
+
+
+
+(eof)
Deleted: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/README.txt
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/README.txt 2009-12-15 16:32:56 UTC (rev 1068)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/README.txt 2009-12-15 16:34:43 UTC (rev 1069)
@@ -1,144 +0,0 @@
-
-JBoss Microcontainer Integration
-
-
-== What's it all about ==
-
-JBoss Microcontainer integration (MC integration for short) makes it possible to inject components deployed as MC beans into components deployed as exo-kernel service components. Exo-kernel is the bottom layer on top of which GateIn si built as a set of services. Exo-kernel uses picocontainer as extremely lightweight dependency-injection (DI) container. All eXo Platform and GateIn components are configured and deployed as exo-kernel services. When deployed to JBossAS, there is another DI container available - JBoss Microcontainer which is the bottom layer through which all JBossAS service components are configured and deploy. MC Integration makes it possible apply JBoss Microcontainer dependency-injection to GateIn components deployed through exo-kernel.
-
-There is no support for MC integration in Tomcat deployment. If a component annotated with @InterceptMC is deployed, a warning is logged, but the component will be deployed anyway - without injections being applied.
-
-
-== How to use ==
-
-
-There is an annotation @InterceptMC, that you annotate your service component with, to turn on MC integration for that component. MC integration only works in JBossAS, so any components that rely on it have to provide alternative injection mechanisms when deployed in Tomcat or somewhere else (i.e. using exo-kernel configuration for injections), or wire up components manually - hardcoded in a component that does just that.
-
-Sometimes you may want to inject JBossAS components per service instance. If you annotate a class, then all instances of this class will share the same configuration, you can't have one instance of the class having one configuration, and another instance of the same class having a different configuration.
-
-There is an xml file based configuration mechanism that allows you to enable MC integration for a service (per class, as well as per instance), and configure injection points and injected values.
-
-For an example of MC integration by using annotations see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
-
-For an example of MC integration by using external configuration see: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
-
-Both these examples use exo-kernel configuration file for creation of service instances: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
-
-That's eXo kernel configuration file, with eXo configurator specific syntax, used to configure DI performed by eXo kernel when configuring and instantiating service components. All GateIn services are configured through this.
-
-
-The external configuration example also uses injection configuration file: http://anonsvn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch/exo....
-
-The configuration format is the same as for jboss-beans.xml files. With a few exception:
- - 'bean' element's 'name' attribute refers to configuration.xml 'component' element's 'key' attribute
- - elements for aop configuration, constructor injections, and many others have no effect
-
-Annotation configuration in mc-int-config.xml overrides any compiled annotations on classes. That means, every instance of the same service class can be specifically targeted for MC injections, and any existing hardwired class annotation can be nullified through configuration.
-
-Only when a component is marked with @InterceptMC annotation, will it have its mc-kernel injection annotations process by mc-kernel, as part of MC integration.
-
-
-== MC integration demo ==
-
-
-The demo demonstrates POJO creation via exo-kernel and use of MC injection annotations (or xml configuration) to have some services injected into our exo-kernel-deployed POJO by MC.
-
-We have three service objects - InjectedBean, InjectingBean, and ExternallyControlledInjectingBean, packaged in a single jar.
-
-InjectedBeans gets instantiated by JBossAS deployer via META-INF/jboss-beans.xml. InjectingBean and ExternallyControlledInjectingBean on the other hand gets instantiated by exo-kernel via conf/configuration.xml.
-
-Exo-kernel knows nothing about InjectedBean, but because InjectingBean is annotated with @InterceptMC it is processed by MC integration logic when instantiated by exo-kernel. The processing pipes it through MC-kernel logic which processes MC-kernel injection annotations, and performs injection of components. The same goes for ExternallyControlledInjectingBean.
-
-Of course, MC-kernel knows nothing about exo-kernel service objects - it can only inject components deployed through one of JBossAS deployers that use MC-kernel to instantiate - or at least register - components.
-
-InjectingBean demonstrates several different ways in which you can perform injection of JBoss services into a component. If instead of using exo-kernel to deploy InjectingBean, you deploy it through JBossAS, these annotations will work just the same - JBossAS uses MC-kernel, and MC-kernel will process the annotations.
-
-There are many annotations used in InjectingBean.java. Apart from @InterceptMC they are all mc-kernel annotations used to configure injections.
-
-ExternallyControlledInjectingBean.java on the other hand contains no annotations at all. All injections are configured externally in conf/mc-int-config.xml.
-
-@InterceptMC is introduced by MC integration to mark classes that should be integrated with MC. Through it you can also control what kind of injections you want MC to perform. By default, field injections are disabled by MC-kernel, as they are deemed an anti-pattern for service objects - they may make your code more difficult to maintain in the long run, as you are giving up the ability to intercept the setting of the field.
-
-Service objects instantiated through exo-kernel don't become part of MC-kernel object repository. That means that dependency management can't be performed by MC-kernel, which means that all the dependencies InjectingBean needs have to be fulfilled before MC-kernel first learns about it. Usually MC-kernel makes several passes over the whole deployment (all the deployment archives), first learning about services and their dependencies, then starting up services that have no dependencies first, and services with dependencies later - when their dependencies are fulfilled.
-
-When using MC integration, we need to make sure, that all the dependencies have already been installed before exo-kernel bootstrap happens. This can be done by deploying all jboss beans as .jars containing META-INF/jboss-beans.xml in deploy dir. JBossAS deploys .jars before .wars and .ears.
-
-
-== Things to look out for ==
-
-There are several exo-kernel bootstrap points that may be used when creating your GateIn portals:
-
-Always use either:
-
-exo-kernel/exo.kernel.container: org.exoplatform.container.web.PortalContainerConfigOwner
-
-or
-
-gatein/portal/trunk/component/web: org.exoplatform.web.GenericHttpListener
-
-
-Never use PortalContainer or RootContainer before first making sure one of the above two proper GateIn initialization points are invoked.
-
-
-
-== Building and deploying ==
-
-
- === exo-kernel ===
-
-cd $REPO/exo-jcr/kernel/branches
-svn co https://svn.jboss.org/repos/exo-jcr/kernel/branches/mc-int-branch
-cd mc-int-branch
-mvn install
-
-
- === packager ===
-
-cd $REPO/gatein/tools/packager/branches
-svn co https://svn.jboss.org/repos/gatein/tools/packager/branches/mc-integration
-cd mc-integration
-mvn install
-
-
- === portal ===
-
-cd $REPO/gatein/portal/branches
-svn co https://svn.jboss.org/repos/gatein/portal/branches/mc-integration
-cd mc-integration
-mvn install -Dmaven.test.skip=true -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
-
-
-
- === Packaging and running GateIn with demo and integration tests deployed ===
-
-cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg
-
-FOR JBOSSAS:
-
- mvn install -Ppkg-jbossas-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
- cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/jboss/bin
- run
-
-FOR TOMCAT (MC integration won't work, but integration tests should pass):
-
- mvn install -Ppkg-tomcat-tests -Dexo.projects.directory.dependencies=REPLACE_WITH_YOUR_OWN_DIRECTORY -Dgatein.checkout.dir=$REPO/gatein/portal/branches/mc-integration
- cd $REPO/gatein/portal/branches/mc-integration/packaging/pkg/target/tomcat/bin
- gatein run
-
-
-
- === Running the integration tests ===
-
-cd $REPO/exo-jcr/kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/
-mvn -Ptests
-
-
-
-If you run your server on non-default IP:port use something like:
-mvn -Ptests -DforkMode=none -Dserver.host=127.0.0.1 -Dserver.port=8000
-
-(Don't forget -DforkMode=none otherwise system properties won't get propagated to the test class)
-
-
-
-(eof)
16 years, 7 months
exo-jcr SVN: r1068 - in kernel/branches/mc-int-branch: exo.kernel.container/src/main/java/org/exoplatform/container/util and 6 other directories.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 11:32:56 -0500 (Tue, 15 Dec 2009)
New Revision: 1068
Modified:
kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java
kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java
kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java
Log:
Added license headers
Modified: kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegration.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc;
import org.picocontainer.ComponentAdapter;
Modified: kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationContainer.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc;
import org.exoplatform.services.log.ExoLogger;
Modified: kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/mc/MCIntegrationInvoker.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc;
import org.exoplatform.services.log.ExoLogger;
Modified: kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/EnvSpecific.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.util;
import javax.servlet.ServletContext;
Modified: kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.container/src/main/java/org/exoplatform/container/util/JBossEnv.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.util;
import javax.servlet.ServletContext;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/InterceptMC.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc.impl;
import java.lang.annotation.ElementType;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCComponentAdapter.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc.impl;
import org.jboss.beans.info.spi.BeanAccessMode;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCInjectionMode.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc.impl;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntConfig.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc.impl;
import org.exoplatform.services.log.ExoLogger;
@@ -22,7 +43,7 @@
* Configuration reader and holder for conf/mc-int-config.xml
*
* mc-int-config.xml uses jboss bean deployer syntax (the one used in jboss-beans.xml).
- * It is only interested in annotation configuration though, and doesn't treat <bean> element attributes
+ * It is only interested in annotation and injection configuration though, and doesn't treat <bean> element attributes
* as referring to mc bean declarations - it treats them as references to exo-kernel components.
* <p>
* Example:
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/src/main/java/org/exoplatform/container/mc/impl/MCIntegrationImpl.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.container.mc.impl;
import org.exoplatform.container.mc.MCIntegration;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/ExternallyControlledInjectingBean.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
import org.jboss.dependency.spi.Controller;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectedBean.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
import org.exoplatform.services.log.ExoLogger;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.demos.mc;
import org.exoplatform.container.mc.impl.InterceptMC;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/ExternalMCInjectionTest.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import org.exoplatform.commons.Environment;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import org.exoplatform.commons.Environment;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest2.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import org.junit.Assert;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest3.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/kernel/it/MCInjectionTest4.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/JUnitInvokerServlet.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
import org.exoplatform.services.log.ExoLogger;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/LogOutputStream.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
import org.exoplatform.services.log.Log;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/main/java/org/exoplatform/tests/TeeOutputStream.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.tests;
import java.io.IOException;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/CopiedException.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import java.io.BufferedReader;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/FailuresParser.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import java.io.BufferedReader;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/LineReader.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import java.io.BufferedReader;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestExternalMCInjectionIntegration.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
import org.junit.Before;
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration2.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration3.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/src/test/java/org/exoplatform/kernel/it/TestMCInjectionIntegration4.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.kernel.it;
/**
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java 2009-12-15 15:36:28 UTC (rev 1067)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/src/main/java/org/jboss/dependency/plugins/helpers/StatelessController.java 2009-12-15 16:32:56 UTC (rev 1068)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.jboss.dependency.plugins.helpers;
import org.jboss.beans.metadata.spi.BeanMetaData;
16 years, 7 months
exo-jcr SVN: r1067 - jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-12-15 10:36:28 -0500 (Tue, 15 Dec 2009)
New Revision: 1067
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
Log:
EXOJCR-318: validate mandatory items for MixinChanged state
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2009-12-15 15:08:42 UTC (rev 1066)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2009-12-15 15:36:28 UTC (rev 1067)
@@ -1224,6 +1224,7 @@
+ " has wrong formed ACL.");
}
}
+ validateMandatoryItem(itemState);
}
}
else
@@ -1328,7 +1329,7 @@
*/
private void validateMandatoryItem(ItemState changedItem) throws ConstraintViolationException, AccessDeniedException
{
- if (changedItem.getData().isNode() && changedItem.isAdded()
+ if (changedItem.getData().isNode() && (changedItem.isAdded() || changedItem.isMixinChanged())
&& !changesLog.getItemState(changedItem.getData().getQPath()).isDeleted())
{
// Node not in delete state. It might be a wrong
16 years, 7 months
exo-jcr SVN: r1066 - jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-12-15 10:08:42 -0500 (Tue, 15 Dec 2009)
New Revision: 1066
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java
Log:
EXOJCR-300: fix test
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java 2009-12-15 15:06:39 UTC (rev 1065)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileValueIO.java 2009-12-15 15:08:42 UTC (rev 1066)
@@ -123,10 +123,10 @@
try
{
vd.getAsByteArray();
- fail("IllegalStateException should have been thrown!");
}
catch (IllegalStateException e)
{
+ fail("IllegalStateException should not have been thrown!");
}
assertTrue(vd.getAsStream() instanceof FileInputStream);
}
16 years, 7 months
exo-jcr SVN: r1065 - jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-12-15 10:06:39 -0500 (Tue, 15 Dec 2009)
New Revision: 1065
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-usecase.xml
Log:
EXOJCR-300: revert node types
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml 2009-12-15 14:43:28 UTC (rev 1064)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml 2009-12-15 15:06:39 UTC (rev 1065)
@@ -150,37 +150,51 @@
</childNodeDefinition>
</childNodeDefinitions>
</nodeType>
-
- <nodeType name="exo:article" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- <!--supertype>exo:rss-enable</supertype-->
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="exo:title" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false"
- multiple="false">
- <valueConstraints />
- </propertyDefinition>
- <propertyDefinition name="exo:summary" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
- multiple="false">
- <valueConstraints />
- </propertyDefinition>
- <propertyDefinition name="exo:text" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
- multiple="false">
- <valueConstraints />
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="nt:file" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
- sameNameSiblings="true">
- <requiredPrimaryTypes>
- <requiredPrimaryType>nt:file</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
+ <nodeType name="exo:relationable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:relation" requiredType="Reference" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:rss-enable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:title" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:summary" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:article" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:base</supertype>
+ <supertype>mix:referenceable</supertype>
+ <supertype>exo:rss-enable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:text" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ <childNodeDefinitions>
+ <childNodeDefinition name="*" defaultPrimaryType="nt:file" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ sameNameSiblings="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:file</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
+
<nodeType name="exo:tab" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
@@ -217,6 +231,28 @@
</childNodeDefinitions>
</nodeType>
+ <nodeType name="exo:published" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:startPublication" requiredType="Date" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:endPublication" requiredType="Date" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:categorized" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:category" requiredType="Reference" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="exo:template" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
@@ -421,6 +457,52 @@
</childNodeDefinitions> -->
</nodeType>
+ <nodeType name="exo:sample" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:base</supertype>
+ <supertype>exo:rss-enable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:title" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:description" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:date" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:datetime" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:summary" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:content" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ <childNodeDefinitions>
+ <childNodeDefinition name="*" defaultPrimaryType="nt:file" autoCreated="false" mandatory="false" onParentVersion="VERSION"
+ protected="false" sameNameSiblings="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:file</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="exo:image" defaultPrimaryType="nt:resource" autoCreated="false" mandatory="false" onParentVersion="VERSION"
+ protected="false" sameNameSiblings="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:resource</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
<nodeType name="exo:watchable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
@@ -552,6 +634,71 @@
</propertyDefinitions>
</nodeType>
+ <nodeType name="exo:folksonomized" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:folksonomy" requiredType="Reference" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:schedulableInfo" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:scheduledInitiator" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:jobName" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:jobGroup" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:jobClass" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:jobDescription" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:scheduleType" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:startTime" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:endTime" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:repeatCount" requiredType="Long" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:timeInterval" requiredType="Long" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:cronExpression" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:counter" requiredType="Long" autoCreated="true" mandatory="true" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>0</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="mix:i18n" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
<propertyDefinition name="exo:language" requiredType="String" autoCreated="true" mandatory="false" onParentVersion="COPY" protected="false"
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml 2009-12-15 14:43:28 UTC (rev 1064)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml 2009-12-15 15:06:39 UTC (rev 1065)
@@ -102,6 +102,41 @@
</childNodeDefinitions>
</nodeType>
+ <!-- exo:actions property will be used to store all actions that reference to this node -->
+ <nodeType name="exo:actionable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:actions" requiredType="Reference" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ <childNodeDefinitions>
+ <childNodeDefinition name="*" defaultPrimaryType="" autoCreated="false" mandatory="false" onParentVersion="VERSION" protected="false"
+ sameNameSiblings="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>exo:actionStorage</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:move" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:repository" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:destWorkspace" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:destPath" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="mix:title" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
<propertyDefinition name="jcr:title" requiredType="String" autoCreated="false" mandatory="false"
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-usecase.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-usecase.xml 2009-12-15 14:43:28 UTC (rev 1064)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-usecase.xml 2009-12-15 15:06:39 UTC (rev 1065)
@@ -33,7 +33,102 @@
</propertyDefinitions>
</nodeType>
+ <nodeType name="rma:record" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>mix:referenceable</supertype>
+ <supertype>exo:metadata</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="rma:recordIdentifier" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:subject" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:format" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:mediaFormat" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:dateFiled" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:publicationDate" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:dateReceived" requiredType="Date" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:originator" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:originatingOrganization" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:addressees" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:otherAddressees" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:supplementalMArkingList" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="rma:isObsolete" requiredType="Boolean" autoCreated="true" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>false</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="rma:superseded" requiredType="Reference" autoCreated="true" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>false</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="rma:recordNote" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:internalUse" requiredType="Boolean" autoCreated="true" mandatory="false" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>true</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<!-- audit nodetypes -->
+
+ <nodeType name="exo:auditable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:auditHistory" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="true" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="exo:auditRecord" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
@@ -137,4 +232,25 @@
</propertyDefinitions>
</nodeType>
+ <nodeType name="exo:archiveable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:restorePath" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY"
+ protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+ <nodeType name="exo:rss-enable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:title" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:summary" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
</nodeTypes>
16 years, 7 months
exo-jcr SVN: r1064 - jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-12-15 09:43:28 -0500 (Tue, 15 Dec 2009)
New Revision: 1064
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml
Log:
EXOJCR-300: restore exo:article node type
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml 2009-12-15 14:42:54 UTC (rev 1063)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config-extended.xml 2009-12-15 14:43:28 UTC (rev 1064)
@@ -150,6 +150,36 @@
</childNodeDefinition>
</childNodeDefinitions>
</nodeType>
+
+ <nodeType name="exo:article" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:base</supertype>
+ <supertype>mix:referenceable</supertype>
+ <!--supertype>exo:rss-enable</supertype-->
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:title" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:summary" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:text" requiredType="String" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ <childNodeDefinitions>
+ <childNodeDefinition name="*" defaultPrimaryType="nt:file" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
+ sameNameSiblings="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:file</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
<nodeType name="exo:tab" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
16 years, 7 months
exo-jcr SVN: r1063 - in kernel/branches/mc-int-branch/exo.kernel.mc-integration: exo.kernel.mc-int and 3 other directories.
by do-not-reply@jboss.org
Author: mstruk
Date: 2009-12-15 09:42:54 -0500 (Tue, 15 Dec 2009)
New Revision: 1063
Modified:
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml
Log:
Moved versioning back in sync with kernel
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2009-12-15 14:15:35 UTC (rev 1062)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2009-12-15 14:42:54 UTC (rev 1063)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<artifactId>exo.kernel.mc-int</artifactId>
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2009-12-15 14:15:35 UTC (rev 1062)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2009-12-15 14:42:54 UTC (rev 1063)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<artifactId>exo.kernel.mc-int-demo</artifactId>
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2009-12-15 14:15:35 UTC (rev 1062)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2009-12-15 14:42:54 UTC (rev 1063)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<artifactId>exo.kernel.mc-int-tests</artifactId>
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2009-12-15 14:15:35 UTC (rev 1062)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2009-12-15 14:42:54 UTC (rev 1063)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<artifactId>exo.kernel.mc-kernel-extras</artifactId>
Modified: kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml
===================================================================
--- kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml 2009-12-15 14:15:35 UTC (rev 1062)
+++ kernel/branches/mc-int-branch/exo.kernel.mc-integration/pom.xml 2009-12-15 14:42:54 UTC (rev 1063)
@@ -10,14 +10,13 @@
</parent>
<artifactId>mc-integration-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>eXo Kernel :: MC Kernel Integration</name>
<description>MC Kernel Integration</description>
<properties>
- <version.parent>2.2.0-Beta05-SNAPSHOT</version.parent>
+ <!--version.parent>2.2.0-Beta05-SNAPSHOT</version.parent-->
<version.jboss.mc>2.0.6.GA</version.jboss.mc>
<version.jboss.mc-int>2.2.0.Alpha2</version.jboss.mc-int>
<version.jboss.classloader>2.0.7.GA</version.jboss.classloader>
@@ -35,12 +34,12 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
- <version>${version.parent}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.container</artifactId>
- <version>${version.parent}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
16 years, 7 months