Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Commits on Nov 07, 2011
Van Halbert MODE-1296 - The properties were being added under the transform:trans…
…formed mixin, instead of transform:withSql
Commits on Nov 08, 2011
@hchiorean hchiorean MODE-1041 Fixed zip sequencer tests on windows
Instead of File.separator, forward slash (/) should've been used
@hchiorean hchiorean MODE-1041 Fixed ddl tests on windows
Instead of loading test resources via Files, the classpath
should be used.

- see
@hchiorean hchiorean MODE-1041 Fixed svn tests on windows
Instead of loading test resources via Files, the classpath
should be used.

- see
Commits on Nov 09, 2011
@hchiorean hchiorean MODE-1287 Deprecated some JCR 2.0 replicas 7a3538e
Commits on Nov 11, 2011
@rhauch rhauch MODE-1298 Added more unit tests to help diagnose
Added several unit tests, plus some 'toString', 'equals', and 'hashCode' methods to the ValueReferences
class and a 'toString' method to the ValueReference class.

This commit includes no changes that attempt to fix the problem.
Commits on Nov 14, 2011
@hchiorean hchiorean MODE-1303 Updated maven plugins versions 0856371
Commits on Nov 16, 2011
@hchiorean hchiorean MODE-1300 Updated Tika version to 1.0
 - cleaned up Aperture mime type detector
 - added an additional test to expose Tika problem parsing PDFContext pdfs
@hchiorean hchiorean MODE-1305 Remove unused i18n methods
 - also a small refactoring of the I18n class
Commits on Nov 22, 2011
@rhauch rhauch MODE-1309 Corrected query behavior when using residual properties as …
…the join criteria

Found and fixed a couple of problems. First, aliases were not being treated properly,
so any projected column with an alias was not actually connected to the underlying
property in the Lucene document. Secondly, the exception reported above was due to an
unnecessary check, which failed when the column corresponded to a residual property
(since the residual properties are not in the schema).

Added a number of new unit tests to verify that such queries (including variations)
are handled correctly. For example, the new tests verify that the criteria can reference
the aliased columns, even though neither of the supplied queries use the aliases in the criteria.

All unit and integration tests pass with these changes.
Commits on Nov 29, 2011
@hchiorean hchiorean MODE-1306 Cargo container is not started or stopped when "skipTests" …
…is true
@rhauch rhauch MODE-1313 Corrected wrapping of exception for invalid identifier
When processing invalid identifiers, the Session.getNodeByIdentifier(String) method
was throwing an internal exception that should be wrapped in a RepositoryException.
This commit adds the check for this condition.

All unit and integration tests pass.
@rhauch rhauch MODE-1314 Corrected JPA 2nd-level cache configuration for Hiberante 3.3+
The "cacheProviderClassName" can now safely be set to a {{RegionFactory}} implementation class, and the JPA connector does the appropriate thing. Note that when using a version of Hibernate earlier than 3.3, the class name of the {{ProviderClass}} implementation should be used for the value.

Also, a new property was added to the JPA connector in ModeShape 2.7. The {{cacheManagerLookup}} connector property can now be used when configuring Infinispan 2nd level cache to specify where in JNDI the Infinispan cache manager can be found.

All unit and integration tests pass.
Commits on Nov 30, 2011
@hchiorean hchiorean MODE-1308 Fixed ModeShape to allow any javax.jcr.Binary implementatio…
…n as value
@hchiorean hchiorean MODE-1308 fixed incomplete handling & conversion of javax.jcr.Binary 94fdad6
Commits on Dec 02, 2011
@hchiorean hchiorean MODE-1315 fixed NPE when listening for property removal restricted by…
… node type
Commits on Dec 05, 2011
@rhauch rhauch MODE-1327 Corrected JPA Source's use of RepositorySourceCapabilities
There were two places where 'RepositorySourceCapabilities' objects were being constructed to replace the existing instance. These were removed and replaced with calls to the 'capabilities.withCreatingWorkspaces(boolean)' and 'capabilities.withUpdates(boolean)' methods (which properly construct and return a new instance).

All unit and integration tests pass with these changes.

Note that these changes should be applied to the 'master' and '3.x' branches.
@rhauch rhauch MODE-1328 Added to public API methods to register the node types defi…
…ned in CND & XML files

Added the 'org.modeshape.jcr.api.nodetype.NodeTypeManager' interface that extends the 'javax.jcr.nodetype.NodeTypeManager' interface with new 'registerNodeTypeDefinitions(...)' methods that accept File, URL, or InputStream objects.

A new test class was added to verify the behavior. Also, the 'CndNodeTypeReader' and 'JackrabbitXmlNodeTypeReader' classes have been deprecated.

All unit and integration tests pass.
@rhauch rhauch MODE-1328 Minor changes to the custom NodeTypeManager methods
The methods of the org.modeshape.jcr.api.nodetype.NodeTypeManager were renamed
to 'registerNodeTypes' to mirror the standard methods in the
javax.jcr.nodetype.NodeTypeManager methods.
Commits on Dec 09, 2011
@rhauch rhauch MODE-1325 Added property to JPA source to control background garbage …

Some use cases of ModeShape involve uploading files and then rarely (if ever) modifying those values.
In such cases, the background garbage collection process might be far more detrimental to these applications.
Therefore, this commit adds a new property to the JPA repository source, allowing such background processing
and garbage collection to be disabled. Note that this only affects large values (all BINARY values or large
STRING values), since they can be reused by multiple properties/nodes.

All unit and integration tests pass.
Commits on Dec 16, 2011
@hchiorean hchiorean MODE-1347 fixed potential deadlock in RepositoryConnectionPool
-replaced the peek & take operations with one atomic operation (pool)
-added a couple of tests which test the concurrent get&close connection operations
@rhauch rhauch MODE-1324 Added methods to obtain SHA-1 has for a Binary value
Made the org.modeshape.jcr.api.Binary interface no longer deprecated (we're not using it again in
ModeShape 3.x, too), and added two methods for obtaining the SHA-1 hash of the value's content.
One of the methods returns the byte[] form of the hash, while the other returns the hexadecimal
string form of the same hash.
@rhauch rhauch MODE-1349 Removed the JPA connector's caching of binary values
Although the binary value content should not be put into the 2nd level cache because of the @Lob
field, this change removes the LargeValueEntity class from the set of classes that should be
put into Hibernate's 2nd level cache, thereby removing any concern of caching these potentially
large values.

All unit and integration tests pass.
@rhauch rhauch MODE-1348 Export changed to limit memory consumption with large binar…
…y values

Exporting a workspace that has a lot of large binary values can result in out-of-memory errors, since the binary values are held in memory. (See MODE-1346 for improvements within the 3.x codebase.) While it'd be very difficult to change how the binary values are handled in 2.x, it should still be possible to modify the export logic to prevent holding all workspace content in-memory.

Therefore, the following changes were made to the export process:

1) After every Binary value on an _unmodified_ property is exported, that binary value is purged from memory and allowed to be garbage collected. Note this makes the binary values unusable (see step 2).
2) At the end of the export, the node that was exported is refreshed while keeping any transient changes, throwing out of the session's cache all _unmodified_ property values (including the binary values that were purged in step 1).

Note that the above steps only apply to _unmodified_ properties. This is very often the case, as a new session is used to export persisted content from the workspace. However, sessions _with transient changes_ can be exported, which is why the two steps listed above only purge binary values on _unmodified_ properties.

All unit and integration tests pass with these changes.
Commits on Dec 17, 2011
@rhauch rhauch MODE-1350 Improved scalability of SearchEngineIndexer
Changed the SearchEngineIndexer to no longer keep the subgraph read requests in the CompositeRequestChannel, which can cause OutOfMemoryErrors when the workspace content is very large or when it contains large binary values.
Commits on Dec 21, 2011
@rhauch rhauch MODE-1359 Corrected NPE during join evaluation
Added an integration test that verifies the above test code does indeed fail. After fixing the various {{Joinable}} and {{Comparable}} implementations in {{JoinComponent}} (used by both the nested loop join and merge join algorithms, the test code passes. Additionally, all other unit and integration tests pass.

This code will need to be merged into 'master' (for inclusion in 2.7.0.Final) and '3.x' (for inclusion in the 3.0 codebase).
Commits on Dec 22, 2011
@rhauch rhauch Updated release notes and authors file for 2.7.0.Final 04de1e6
@rhauch rhauch Changed version to 2.8-SNAPSHOT after releasing 2.7.0.Final ae5876a
Commits on Jan 03, 2012
@rhauch rhauch MODE-1364 Corrected use of reference in join condition
The indexes were not storing the value of REFERENCE or WEAK REFERENCE properties, and thus
null was returned in the tuples for these records. Consequently, the join could not be performed
with null values.

Added several test cases that replicated this problem and now verify the updated code
exhibits the correct behavior.
Commits on Jan 09, 2012
@hchiorean hchiorean MODE-1362 Cleaned-up ddl integration tests and added test method for …
…validating content
Commits on Jan 10, 2012
@hchiorean hchiorean MODE-1362 Fixed mismatch between cnds and actual produced nodes by th…
…e ddl sequencer
@rhauch rhauch MODE-1362 Corrected integration tests
The JcrDriverIntegrationTest queries the output of the DDL sequencer, and so required
changes to the expected results to mirror the updated output.
@rhauch rhauch MODE-1366 Error parsing JCR-SQL2 queries using square brackets for qu…

The JCR-SQL2 grammar uses square brackets for quoting identifiers, node names
and node paths. However, path literals may also have square brackets around
the same-name-siblings. The JCR-SQL2 parser was not able to properly parse
quoted paths with SNS indexes.

The fix is to adjust the tokenizer to count the number of open and close
square brackets, and to stop the quoted string token when the all of the opened
square brackets were closed. Additional unit tests were added to verify the
tokenizer and JCR-SQL2 parser behavior.

All unit and integration tests pass with these changes.
Commits on Jan 13, 2012
@rhauch rhauch MODE-1367 Corrected copyright dates for 2012
Updated the two COPYRIGHT.txt files and also updated the two AUTHOR.txt files
to reflect the contributors.
Commits on Jan 17, 2012
@rhauch rhauch MODE-1370 Added additional observation tests
Added three unit tests that verified the ObservationManager.setUserData() is being
set correctly. All tests pass, with no changes to the non-test code, proving the
code is indeed working correctly.
Commits on Jan 18, 2012
@rhauch rhauch MODE-1374 Corrected node type init errors in concurrent env
The JcrNodeDefinition is intended to be immutable and thread-safe, and although
it is publicly immutable, internally it delays loading the references to the
required primary types until needed. The 'ensureRequiredPrimaryTypesLoaded()' method
is what lazily initializes the references, and this method is properly called in
the right spots within JcrNodeDefinition. However, in a highly-concurrent environment
a node type definition may be needed by multiple threads, and this can result
in this method being called concurrently. Unfortunately this method is not thread-safe,
and can cause a NullPointerException when used concurrently.

The 'ensureRequiredPrimaryTypesLoaded()' method just iterates through the names of the
required primary types (which were set in the constructor), and looks up the JcrNodeType
instances for each primary type name. It then creates an immutable map to quickly find
the JcrNodeType instances given the primary type name. Finally, it stores the map
and the names, and when the array of JcrNodeType instances and map are available
(non-null), it merely uses the values. But the creation of the JcrNodeType array and
map keyed by name are not concurrent or atomic. In fact, a non-empty array is created
(but not initialized, so it contains null references) and _immediately set_ on one of the
JcrNodeDefinition fields, so when the method is called by other threads it is as if
the JcrNodeType array is ready to be used. But the original thread hasn't yet set
the JcrNodeType references in the array, so any other thread that uses the array
gets a null reference instead, and using that causes the NullPointerException.

The fix is relatively simple: ensure that the 'requiredPrimaryTypes' array of JcrNodeType
and 'requiredPrimaryTypesByName' map are set in a synchronized way, ensuring they
are only set to non-null with an array (or map) that are fully and correctly populated.
This could be done by simply synchronizing the entire 'ensureRequiredPrimaryTypesLoaded()'
method, but the method calls out to the RepositoryNodeTypeManager. And while the RNTM
doesn't currently (directly or indirectly) result in a call to 'ensureRequiredPrimaryTypesLoaded()',
it's possible it might in the future.  Therefore, we can simply create and fully-populate
the array and map outside of the synchronization block, and only synchronize upon setting
it (of course checking before we set it whether another thread snuck in and set it
while we waited for the lock). So it is effectively the same as synchronizing the method
(which the reporter says fixes the problem), but does it with smaller lock scope.

With this change, all unit and integration tests pass.
Commits on Jan 19, 2012
@hchiorean hchiorean MODE-1373 Moved code which validates sequenced nodes to AbstractSeque…
@hchiorean hchiorean MODE-1373 Fixed mismatch between ms office cnd and code 4b2d7cd
Commits on Jan 26, 2012
@hchiorean hchiorean MODE-1377 Fixed webdav repository path parsing with trailing slash.
- changed request path parsing so that multiple empty '/' characters are collapsed into one.
- updated pom.xml so that log4j dependency is runtime (this is not ideal, but until slf4j dependencies are changed, this should be there)
Commits on Jan 27, 2012
@hchiorean hchiorean MODE-1326 Fixed Oracle DDL exception when parsing CREATE UNIQUE INDEX…
… statements

 The fix was to implement minimal support for unique index in the Oracle parser and to make sure that only "legal" token are delegated to the standard parser.
Commits on Feb 10, 2012
@rhauch rhauch Corrected compilation errors 3c578a4
Commits on Feb 11, 2012
@rhauch rhauch MODE-1398 Added new connector for Infinispan 5
Added a new connector that uses Infinispan 5.x caches for storage. The existing
Infinispan 4.x connector is still usable, and basically users would choose between
the two. Note that Infinispan 5.1.1.Final is likely to be used by JBoss AS 7.1.0.Final.

All unit and integration tests pass.
Commits on Feb 14, 2012
@hchiorean hchiorean MODE-1302 Fixed session.refresh algorithm
Two issues fixed:
- refresh phase 1 - determining which nodes should be left and which should be discarded
- LinkedListMultimap clear method, which cause refresh phase 2 to incorrectly duplicate existing nodes under a parent, as SNS.
@rhauch rhauch MODE-1398 Added new connector for Infinispan 5
Made additional changes/fixes to the Infinispan 4 and 5 connectors and tests.
@rhauch rhauch Merge branch 'MODE-1302' of in…
…to hchiorean-MODE-1302
@hchiorean hchiorean MODE-1279 - Fixed repository blocking after performing a full-text se…
…arch multiple times

The fix was part of the #207 pull request, which basically removed explicit synchronization around the LuceneSearchProcessor and Engine.

In addition:
- the lucene version was updated from 3.1.0 to 3.4.0
- the LuceneSearchSession was updated to avoid the possible loss of content when indexing the same content in the same workspace from multiple threads
@hchiorean hchiorean MODE-1279 Removed styling changes and moved NoMoreFederatedRequest in…
…side finally construct
@rhauch rhauch MODE-1400 Added error/warning checks when registering node types via …
…CND files

Previously, the CND files were being read but any problems during the reading were not reported and were simply
ignored. Some errors cause the reader to abort reading and to have successfully read in no node types, so
registration appeared to do nothing while hiding the errors. With these changes, the errors and warnings
are included in a thrown exception; if there are no errors and only warnings, the warnings are simply logged.

All unit and integration tests pass.
@rhauch rhauch MODE-1401 Corrections to behaviors when nodes are checked in
Corrected several behaviors of what is allowed and not allowed for modifying nodes
that are checked in, per Section 15.2.2 of the JCR specification. Several new unit
tests were added that verify these behaviors. These new tests all failed prior to
these fixes, but they all pass now. (Note this clearly shows the incomplete coverage
of the TCK versioning tests.)

All unit and integration tests pass with these changes.
Commits on Feb 16, 2012
@rhauch rhauch MODE-1307 Added Content-Type HTTP header to REST examples
The examples in the RESTful Service chapter did not show including the "Content-Type" HTTP
header. The service will correctly return JSON if this header or "Content-Type" header is
supplied in the request. However, an error will result if a different content-Type header
is provided.

This change only affects the Reference Guide.
Commits on Feb 17, 2012
@hchiorean hchiorean MODE-949 Added integration test for text sequencer, so that any repor…
…ted issues may be easily verified
Commits on Feb 18, 2012
@hchiorean hchiorean MODE-1298 Added test case for cloning binary content across workspace…
…s in a disk store
Commits on Feb 21, 2012
@hchiorean hchiorean MODE-1238 Fixed indexing for federated connectors
The fix allows changes to be recorded & dispatch always (not only when the source and target of the projection are the same)
Commits on Feb 23, 2012
@hchiorean hchiorean Fixed OSGI dependency for JBossAS - make sure the same version is used
Without this, the Java Sequencer and the JBoss AS assembly would bring in 2 different versions, causing the Ant script from JBossAS to fail when unsigning the jar.
Commits on Feb 24, 2012
@hchiorean hchiorean MODE-1235 Fixed missing exception handling which could cause indefini…
…te hangs when repository starts up.

Also, added a test case which reproduces the steps in MODE-1235
@hchiorean hchiorean MODE-1235 Extended a try/finally scope to make sure the composite req…
…uest is always frozen
@hchiorean hchiorean MODE-1403 Added test case for one of the scenarios described in https… 63740cd
@hchiorean hchiorean MODE-1403 Added separate profile for testing with Infinispan 4 and 5 …

ISPN 5 uses a newer version of jboss-logging, therefore when this connector is used, some transitive dependencies need to be disabled
@rhauch rhauch MODE-1252 Added repository name constant in RepositoryFactory
Moved the URL an REPOSITORY_NAME constants from the JcrRepositoryFactory implementation
class into the existing org.modeshape.jcr.api.RepositoryFactory interface. These
constants can be used when programmatically defining the parameters to pass to the
RepositoryFactory.getRepository(Map) method.

Also added more JavaDoc, and deprecated the constants in the JcrRepositoryFactory class.

All unit and integration tests pass with these changes.
Commits on Feb 27, 2012
@rhauch rhauch Updated release notes for 2.8.0.Final 5ff2f05
@rhauch rhauch 'Release: update versions for modeshape-2.8.0.Final' e62ce3d