Commits on Oct 28, 2011
Commits on Oct 27, 2011
  1. MODE-1281 Corrected file connector's extra properties storage

    When storing extra properties, the file system connector incorrectly wrote an empty multi-valued property
    without the required trailing line separator. One example is the "jcr:predecessors" property, which is empty
    upon first checkin of a 'mix:versionable' node. This caused an exception when reading the property back in.
    This change corrects the way such empty properties are written to the file, but also adds logic to the
    method that parses the file's lines to handle reading in files that were written with older versions.
    The original problem was replicated with a new unit test and a new integration test, and then the
    reading and writing logic were both independently verified. The new tests now pass.
    All unit and integration tests pass.
    rhauch committed Oct 27, 2011
  2. MODE-1285 JPA entities are now Serializable

    Changed the JPA entities in the JPA connector to all be serializable. They should have been Serializable in the first place, as Hibernate clustered cache implementations require this.
    All unit and integration tests pass.
    rhauch committed Oct 27, 2011
Commits on Oct 25, 2011
  1. MODE-1283 Corrected use of JNDI context in InfinispanSource

    One of several usages of JNID Context was not properly checking for condition where the InfinispanSource
    is not configured with a Context reference (this is used primarily for testing). The other cases where
    JNDI context is used are all properly handled.
    rhauch committed Oct 25, 2011
  2. Updated console rhq plugin version to 1.0.1

    Van Halbert committed Oct 25, 2011
Commits on Oct 7, 2011
  1. MODE-1277 Corrected result behavior for multi-selector join queries

    I've replicated the error in a test case, and it appears to be a problem in the results of join queries. The problem was that the code for MultiSelectorQueryResultRow was a) using the wrong index and b) calculating the index incorrectly. The problems were fixed and verified with a successful test. All unit and integration tests pass with the changes.
    Note that the changes are limited in scope to the MultiSelectorQueryResult class (used only in join queries) and a few additional methods (and state) in some of the o.m.g.query.* classes that are never used outside of the MultiSelectorQueryResult class. Therefore, the risk of unintentional changing the behavior of other functionality is quite low, while the benefit is that this issue is fixed.
    rhauch committed Oct 7, 2011
Commits on Sep 26, 2011
  1. MODE-1273 Removed the Seam Security provider

    The authentication provider that is aware of Seam Security was removed because of the complexity
    that even this 'provided' dependency added. It's still extremely easy for users to implement
    an authentication provider that ties into their own security system, and we don't need to do
    this for Seam Security any more than we do other frameworks.
    rhauch committed Sep 26, 2011
Commits on Sep 24, 2011
  1. MODE-1269 Changed recently-added reindexing API

    Having the maximum depth parameter in the reindex methods will likely cause far more issues and problems that will be difficult to track down. In fact, specifying the depth can be more optimum (but no better) than indexing to the fullest depth only in a few cases. Since keeping the depth parameter is extremely risky with very little benefit, I've removed the depth parameter from the public methods (which have not yet appeared in a release).
    We may indeed discover that the depth is very useful, and if that's the case we can always add additional methods with a depth parameter. Adding methods to a public API is easy; removing methods is nearly impossible.
    This testing also highlighted a bug in the way the Lucene indexes were updated to remove children below some depth. This bug was corrected.
    As always, all unit and integration tests pass with these changes.
    rhauch committed Sep 24, 2011
Commits on Sep 23, 2011
  1. MODE-1224 Improved start performance

    The startup time of a new repository was reduced by making a simple change to the way the node types are persisted. If existing node types are to be skipped, then we know that any requests to create new nodes will not replace existing content (since there is no existing content for nonexistent nodes).
    An additional integration test was added to easily test this situation, using all of the node type CND files for all of the sequencers. Tests that use ModeShape with a local PostgreSQL database reduced the time required to register node types from ~11seconds to about 6 or 7 seconds. Hopefully this will have a similarly significant effect on the startup when using a remote database.
    All unit and integration tests pass with these changes.
    rhauch committed Sep 23, 2011
  2. MODE-1263 Corrected indexing depth logic

    The SearchEngineIndexer was doing math improperly. This doesn't appear to have affected any use cases except those that use the file system connector, since the file system connector uses its own maxDepth value (and ignores the value submitted by the indexer). It is in this case that the indexing stops one level too early.
    Several new integration tests were created to verify the reported problems.
    With a minor fix, the indexing operates correctly, and the new integration tests do indeed pass and demonstrate that the indexing (and the re-indexing) does indeed work properly.
    rhauch committed Sep 23, 2011
  3. MODE-1224 Improved restart performance

    Added quite a few debug logging statements to help identify the issue with startup times. Also added two info-level log messages around the node registration activity.
    Created a test case that uses a slightly-modified EDS configuration (different index location in 'target' area, HSQLDB stored on disk in 'target' area), and starts then restarts the engine.
    I was able to see the problem, and I believe it is solely because of the re-registration of the node types listed in the configuration file. I then changed the registration process to allow a flag that will not re-register the node type if a node type already exists with the same name (there was already a flag to fail if the node type exists), and changed the startup to a) not fail but b) to skip the registration for any node type that already exists.
    After implementing this change, restarting appears to be significantly faster. If fact, my tests show that the time to register the node types in subsequent restarts goes from minutes to ~0.02 seconds.
    All unit and integration tests pass.
    rhauch committed Sep 23, 2011
Commits on Sep 22, 2011
  1. MODE-1273 Corrected Seam Security provider behavior

    When the Seam Security API is available on the classpath, but it is not enabled for use
    then the new provider was causing problems. A simple check fixes the problem.
    rhauch committed Sep 22, 2011
  2. MODE-1267 Correct setting property to Value containing null

    The JCR specification is not terribly clear on the behavior when null references are passed into the ValueFactory.create(…) methods. According to the JavaDoc, the spec, and the reference implementation, no error should be thrown. However, a ValueFormatException must be thrown when a non-null Value object (containing a null reference) is passed to Property.setValue(Value) or Property.setValues(Value[]) or Node.setProperty(String,Value) or Node.setProperty(String,Value[]). (Note that setting a property to a null Value reference is equivalent to removing the property.)
    This change enables this behavior in ModeShape. Prior to this, ModeShape would allow setting a Value for a property even if that Value contained a null reference.
    rhauch committed Sep 22, 2011
  3. MODE-1273 Added built-in authentication using Seam Security

    Added a built-in authentication/authorization provider to be enabled if and only if the "" class is on the classpath. The provider works when no Credentials are passed in, and creates an authenticated session based upon the current Identity instance if that Identity instance is already logged in.
    All unit and integration tests pass with these changes, although none of our tests actually run with Seam Security. Therefore, additional testing will have to be done with system-level tests.
    rhauch committed Sep 22, 2011
  4. MODE-1270 Add support for setting Session's user ID based upon JAAS S…

    …ubject in J2EE
    The standard way to get the current JAAS Subject given the LoginContext or AccessController
    works in standard Java but not in J2EE. Apparently this is a well-known issue. The recommended
    approach for J2EE is to instead get the Subject via the JACC API.
    This change adds an optional (e.g., "provided") dependency on the JACC API, changes
    the JaasProvider implementation to accept an optional SubjectResolver implementation
    that the provider will use to resolve the Subject should the standard JAAS technique
    not work, and to change the JcrRepository implementation to give the JaasProvider
    a new JaccSubjectResolver implementation (when the JACC API is available).
    It is not really possible to test whether this technique works in our unit or integration
    tests (as we don't deploy to a J2EE container). However, all existing unit and integration
    tests do pass (meaning it doesn't break their functionality), and Kurt is verifying
    that the JACC-style approach works within Guvnor and will (after this commit) verify
    that these changes do indeed work within Guvnor (which uses Seam in JBoss AS).
    rhauch committed Sep 22, 2011
  5. MODE-1269 Methods to re-index workspace content are now public

    The re-indexing methods were previously on JcrSession, which was a package-protected
    class, and thus the re-indexing methods were not publicly accessible. This change
    moves the methods to the org.modeshape.jcr.api.Workspace interface is ModeShape's
    public API. Now there are synchronous and asynchronous methods to re-index the entire
    workspace and to re-index a subgraph below some path to a maximum depth.
    Additional tests were added to verify the methods work. All unit and integration
    tests pass.
    rhauch committed Sep 22, 2011
  6. MODE-1150 Correct dependencies and documentation for SLF4J

    Found some SLF4J dependencies that were still using the older version, plus the documentation
    should have been updated.
    rhauch committed Sep 22, 2011
Commits on Sep 14, 2011
  1. MODE-1262 Temporary fix to unpublish the file published in the test. …

    …This patch needs to be removed when the problem is resovled
    vhalbert committed with rhauch Sep 14, 2011
  2. MODE-1264 Upgraded webdav-servlet to 2.0.1

    Also updated the documentation to reference the new version.
    ceefour committed with rhauch Sep 11, 2011
  3. MODE-1263 Corrected indexing logic for file system content

    Added the integration test supplied by Danny (with some minor modifications) and updated the @Before method in the FileSystemRepositoryIntegrationTest, and verified the query does not include any of the files or folders already present on the file system.
    After a bit of debugging, I was able to figure out what the problem is and why we're only seeing it for the file system connector.
    The actual bug is in SearchEngineIndexer logic: when the subgraph comes back with just a single node (i.e., the subgraph only contains a single level), the loop at line 336 will exit without processing the children of the single node in the subgraph. The fix is to check for this condition and add the children to the locationsToRead list before going into the loop.
    The problem only manifests itself with the FileSystemConnector because it is the only connector to override the 'absoluteMaximumDepthForBranches()' method to return 1. All other connectors return the default value, 4 (or some other number > 1), and therefore the subgraph contains multiple levels and the while loop is entered and the children processed.
    After the fix to SearchEngineIndexer, all unit and integration tests pass, including the new integration test.
    Thanks again to Danny C for identifying this issue and creating an easily reproducible test case!
    rhauch committed Sep 14, 2011
Commits on Sep 12, 2011
  1. MODE-1259 change the assembly to attach to mead repo, incorrectly cha…

    …nge the wrong attach property
    vhalbert committed Sep 12, 2011
  2. MODE-1261 Fixed JackrabbitXmlNodeTypeRegistrationTest on Solaris.

    BOM (Binary Order Mark) at the start of owfe_nodetypes.xml file was causing failing of two tests on Solaris 9 machines. BOM was deleted.
    psiroky committed Sep 12, 2011
Commits on Sep 7, 2011
  1. MODE-1259 Change modeshape-distribution pom.xml to attach javadocs to…

    … the mead repository
    vhalbert committed with rhauch Sep 7, 2011
  2. MODE-1244: Fix for NPE while server is being restarted

    Ted Jones committed with rhauch Sep 7, 2011
  3. MODE-1256 Corrected federated move logic

    The move logic within the join process of the federated connector was incorrectly setting the actual location of the node after it was moved. Because this happens after the source connector performed the move, the node was indeed moved. The error occurred during the federation of the source results, and thus caused a problem with the JCR layer. The fix was a simple correction.
    This change adds new integration test that replicates the reporter's configuration (but with an in-memory instead of a file system source). Before the fix, this test did replicate the reported exception, and after the fix the test succeeds.
    All unit and integration tests pass with these changes.
    rhauch committed Sep 7, 2011
  4. MODE-1254 Okay to call toString on ModeShape's Node and Property obje…

    …cts with Binary values
    Large Binary values would cause an out-of-memory exception when 'toString()' is called.
    This change corrects that behavior to place "**binary-value**" in the toString() result
    any place where a Binary value is encountered.
    A new unit test was added to verify the behavior, and all unit and integration tests pass.
    rhauch committed Sep 7, 2011
  5. MODE-1257 Corrected class cast exception

    The JoinRequestProcessor.process(RemovePropertyRequest) was incorrectly casting the forked request
    to SetPropertyRequest. This was a copy-and-paste error, and fixing it appears to fix the issue.
    (Additional tests being added under MODE-1256.)
    All unit and integration tests pass with these changes.
    rhauch committed Sep 7, 2011
  6. MODE-1255 Corrected 'restore' logic

    The logic for restoring nodes was not correctly getting the 'jcr:primaryType' value when checking
    if the node in version history had a primary type of 'nt:frozenNode': it was comparing the
    'nt:frozenNode' Name constant to the Property object (rather than the first value of the Property).
    Thus, the if-check never succeeded, and the node is restored with a primary type of 'nt:frozenNode'.
    After the simple fix, all unit and integration tests pass.
    rhauch committed Sep 7, 2011
Commits on Sep 6, 2011
Commits on Sep 2, 2011
  1. Ignored .log files

    rhauch committed Sep 2, 2011
Commits on Aug 31, 2011
  1. MODE-1243 Improved JndiRepositoryFactory logic and logging

    The JndiRepositoryFactory now uses the "type" value (as specified in the 'conf/context.xml' for Tomcat) as the major impetus for registering the ModeShape JcrEngine instance or a javax.jcr.Repository instance. If an engine is to be registered, then the existence of a 'repositoryName' is logged as a warning. If a repository is to be registered, then the 'repositoryName' value is expected and must match an existing repository; all other cases are logged as an error.
    rhauch committed Aug 31, 2011
Commits on Aug 25, 2011