Permalink
Commits on Jan 27, 2012
  1. MODE-1386 Updated Maven assemblies, corrected dependencies, and added…

    … examples
    
    The Maven assemblies were corrected (a bit; still work to do to create usable distributions),
    but several dependencies were removed and two examples were added to the codebase (but not to
    the build yet).
    rhauch committed Jan 27, 2012
Commits on Jan 26, 2012
  1. MODE-1387: Removed extra folder under modules and removed unneeded de…

    …pencies from the org.modeshape module
    tejones committed Jan 26, 2012
  2. MODE-1384 Changed JBoss AS7 kit assembly to use project version variable

    Previously, the '3.0-SNAPSHOT' was hardcoded. Plus, some of the Maven modules were
    referencing 'modeshape-jcr-redux', which was just replaced by 'modeshape-jcr'.
    
    Even with a clean Maven repository, the build works well.
    rhauch committed Jan 26, 2012
  3. Temporarily removed the 'modeshape-unit-test' module

    The module was temporarily removed from the build, since it requires the 'modeshape-jdbc-local' module
    that has not yet been included in the build (since it depends on queries working).
    rhauch committed Jan 26, 2012
  4. 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)
    hchiorean committed Jan 26, 2012
Commits on Jan 25, 2012
  1. MODE-1368 Removed all legacy modules no longer needed in 3.x

    ModeShape 3.x will not need a number of the 2.x modules. In particular:
    - since 3.x will only have an AS7 kit, the AS5 or AS6 artifacts were removed
    - all the connectors were removed, since they're no longer used
    - the connector benchmark tests module was removed, replaced by our new
      performance test suite
    - the JPA DDL generator utility has been removed
    - the 'modeshape-graph', 'modeshape-repository', 'modeshape-search-lucene'
      and 'modeshape-clustering' modules have all been removed, since the new
      'modeshape-jcr' module no longer uses them
    - the DocBook modules were removed and are replaced by the Confluence space
    - the two JDBC modules were moved out of the 'utils' directory to top-level modules
    
    The build still works, but not all components have been included in the build.
    This is because the query functionality doesn't yet work, so quite a few web
    and JDBC driver modules all depend on this.
    
    The assembly profile has not yet been changed or corrected.
    rhauch committed Jan 25, 2012
  2. MODE-1381: Removed unneeded dependencies from modules and removed ext…

    …raneous interface from services.
    tejones committed Jan 25, 2012
  3. MODE-1381: Updated POM

    tejones committed Jan 25, 2012
Commits on Jan 24, 2012
  1. MODE-1365 Migrated JCR query functionality

    Migrated the JCR query functionality from 2.x into the 3.x codebase.
    
    At this point, all parsing and query object model code and tests have been moved,
    all of the query-relate JCR interfaces have been implemented, and the internal
    RepositoryQueryManager is created and wired up.
    The repository configuration schema and RepositoryConfiguration class have been
    changed to contain the indexing-related options, and we're creating and using the
    Hibernate Search components correctly.
    
    However, some work is still required:
    - indexing content changes (upon session.save and upon creating Binary values),
    - generating the Lucene Query objects for the various JCR-JQOM criteria
      (these methods have not yet been migrated)
    
    As a result, queries parse but never return results.
    
    All unit and integration tests pass.
    rhauch committed Jan 4, 2012
  2. MODE-1380 Improve NodeTypeManager.registerNodeType methods

    Make the ModeShape-specific NodeTypeManager.registerNodeTypes(...) methods more like the standard javax.jcr.nodetype.NodeTypeManager.registerNodeTypes(...) method. In particular, update the JavaDoc and change the return type from void to NodeTypeIterator.
    rhauch committed Jan 24, 2012
Commits on Jan 20, 2012
  1. MODE-1375 Added support for system property variables in repository c…

    …onfiguration JSON documents
    
    The JSON Schema validation logic already looked for cases where a field value object does
    not have the correct type expected in the JSON Schema; such situations were reported as
    errors (just like the other errors). This was changed so that, in these situations, the
    schema validator tries to convert the actual value to the expected type; if that doesn't work,
    the error is reported as usual, but if it can be converted, a special "mismatched type" error
    is reported instead and includes the actual value, the converted value, the actual type,
    and the converted type. (To public users, this is merely just a regular error, though.)
    
    Also added a method to create a copy of a Document using a supplied `ValueTransformer` instance,
    which the copy logic uses to transform each of the values within the Document. This copy
    logic returns the same Document instance (not a copy) if no values were transformed, but
    returns a new Document object if at least one value was transformed.
    
    Added another method to create a copy of a Document using the validation results, where
    we look for all of the "mismatched type" errors and use the converted value in place of the
    actual value. (This process includes nested documents and arrays.)
    
    Then the RepositoryConfiguration constructors were modified to try to create a copy
    of the supplied document using a SystemPropertyTransformer; if a new Document were created
    (because variables were replaced), then the new Document is validated against the schema
    and any "mismatched type" values are used to create a copy of the document with the
    mismatched values converted to the expected values. The RepositoryConfiguration then
    uses the new Document with converted values, and the user can continue to validate
    the configuration using the existing "validate()" method. This is where any problems
    with the system properties will show up to the user. For example, if a variable is
    replaced with a system property that cannot be converted to the type expected by the
    JSON Schema for that field, a normal validation error will be included in the validation
    results.
    
    In general, all this happens transparently to RepositoryConfiguration users.
    rhauch committed Jan 20, 2012
  2. MODE-1339 Enhanced the types of properties which can be set on compon…

    …ents.
    
    - it should now be possible to set arrays, collection instances, maps and nested beans.
    - refactored the component creation code in RepositoryConfiguration
    hchiorean committed Jan 20, 2012
Commits on Jan 18, 2012
  1. 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.
    
    Unlike the fix in the 2.x codebase, this change removes the cached JcrNodeType references
    (both the array and the map keyed by Name) from JcrNodeDefinition. This simplifies the
    JcrNodeDefinition class by making it fully immutable (not just publicly immutable).
    It also ensures that when node types are updated, they are accurately reflected in
    all child node definitions.
    
    With this change, all unit and integration tests pass.
    rhauch committed Jan 18, 2012
  2. Merge branch 'MODE-1337' of https://github.com/hchiorean/modeshape in…

    …to hchiorean-MODE-1337
    rhauch committed Jan 18, 2012
  3. 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.
    rhauch committed Jan 18, 2012
  4. MODE-1337 Ported Microsoft Office sequencer to 3.x

    -fixed incompatibilities between cnd and code
    -added unit tests
    hchiorean committed Jan 18, 2012
  5. MODE-1337 Updated MimeType support in 3.x

    - moved MimeTypeDetector interface to -jcr-api module
    - added default aperture based implementation
    - simplified the usage of MimeTypeDetectors
    - updated sequencing context to expose the extended value factory and mime type detector
    hchiorean committed Jan 17, 2012
Commits on Jan 17, 2012
  1. 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.
    rhauch committed Jan 17, 2012
  2. MODE-1371 Updated statistics framework

    Exposed the repository statistics framework in our public API, so now the enumerations
    and interfaces for accessing the statistics are in the 'modeshape-jcr-api' module.
    The enumerations were also changed to encapsulate a human-readable label and description.
    
    Since the statistics were using DateTime, and using Calendar is a PITA, I also moved
    the DateTime interface into the 'org.modeshape.jcr.api.value' package.
    
    Several new metrics were added to cover observation and sequencing.
    
    All unit and integration tests pass with these changes.
    rhauch committed Jan 17, 2012
Commits on Jan 16, 2012
  1. MODE-1336 Ported mp3 sequencer to 3.x

    Also, updated jaudiotagger version to 2.0.3
    hchiorean committed Jan 16, 2012
  2. MODE-1336 Fixed reading of the same file in the binary store by multi…

    …ple concurrent readers
    
    The old code created new input streams over the same file channel, which means that concurrent reading was not possible (each reader would see a different position in the stream). The solution was to not use the same file channel and make sure each reader has its own (dedicated) stream.
    hchiorean committed Jan 16, 2012
Commits on Jan 13, 2012
  1. 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.
    rhauch committed Jan 13, 2012
Commits on Jan 12, 2012
  1. MODE-1334 Ported java sequencer from 2.x

    -removed old OriginalFormatSourceFileRecorder
    -refactored test code so that the class file and java file sequencers use the same test files
    -fixed JDT parser so that 1.5 files (and greater) are properly handled
    -refactored JDT metadata classes
    hchiorean committed Jan 12, 2012
Commits on Jan 11, 2012
  1. MODE-1334 Renamed classfile sequencer module to java, which will hold…

    … both sequencers in the end
    hchiorean committed Jan 11, 2012
Commits on Jan 10, 2012
  1. MODE-1366 Error parsing JCR-SQL2 queries using square brackets for qu…

    …oting
    
    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.
    rhauch committed Jan 10, 2012
  2. MODE-1363 Fixed compilation errors

    The POM for the 'modeshape-jbossas-subsystem' was not bringing in the correct
    dependencies.
    rhauch committed Jan 10, 2012