Permalink
Commits on Jul 11, 2011
  1. Updated release notes

    rhauch committed Jul 11, 2011
Commits on Jul 9, 2011
  1. Merge branch 'MODE-1212' of https://github.com/bcarothers/modeshape i…

    …nto bcarothers-MODE-1212
    rhauch committed Jul 9, 2011
  2. MODE-1214 modeshape-connector-store-jpa issue when trying to start JB…

    …oss AS 5.1
    
    Fixed default cacheProviderClassName value to 'null' on JpaSource.
    bcarothers-xx committed Jul 9, 2011
  3. MODE-1212 Clean up unit/integration tests that uses SecurityContextCr…

    …edentials
    
    Attached patch removes all test uses of SecurityContextCredentials and replaces custom RepositoryContext implementations with MockRepositoryContext where possible.  All tests pass.
    bcarothers-xx committed Jul 9, 2011
  4. Merge branch 'MODE-1215' of https://github.com/bcarothers/modeshape i…

    …nto bcarothers-MODE-1215
    rhauch committed Jul 9, 2011
Commits on Jul 8, 2011
  1. MODE-1215 java.lang.StackOverflowError seen in the server when access…

    …ing ModeShape through Teiid
    
    Fixed a bad I18n message and added a test case to verify that the behavior was broken and is now fixed.  Unfortunately, the I18n message that was bad was the same error message that gets used when the I18n message is bad - hence the stack overflow.
    bcarothers-xx committed Jul 8, 2011
  2. Merge branch 'MODE-1214' of https://github.com/bcarothers/modeshape i…

    …nto bcarothers-MODE-1214
    rhauch committed Jul 8, 2011
  3. MODE-1214 modeshape-connector-store-jpa issue when trying to start JB…

    …oss AS 5.1
    
    Attached patch that removes all use of JPA2 from the JPA connector, as JBoss AS 5.1 supports Java EE 5, and Java EE 5 only supports JPA, not JPA2.  It seems possible to make JPA2 work in AS5 (according to this post: http://community.jboss.org/thread/159628), but it requires users to jump through some hoops.
    
    The JPA2 dependencies were all added as part of the MODE-1209 fix, but it is possible to preserve the ability to cache nodes without using JPA2.  That is what this patch does.
    bcarothers-xx committed Jul 8, 2011
  4. MODE-1107, MODE-1205 Added support for pluggable authorization and au…

    …thentication
    
    Changed how the ModeShape JCR repository authentication and authorizes clients to no longer be entirely self-contained. Now, it is possible to configure each Repository instance with one or more customized authentication providers that are added to several built-in authentication providers for JAAS, anonymous (if configured), and HTTP Servlet. When Repository.login(...) is called, these providers are consulted in serial to authenticate the supplied credentials, and a Session is created if any provider successfully authenticates.
    
    The ExecutionContext's SecurityContext is used to perform any authorization. Since the already-existing SecurityContext could only perform role-based permissions, a new AuthorizingSecurityContext interface was added to do path-based authorization, and is now used first if the ExecutionContext's security context is an AuthorizingSecurityContext implementation.
    
    Therefore, each authenticator is responsible for creating an ExecutionContext that represents the user, including an appropriate (Authorizing)SecurityContext instance.
    
    The AuthorizationProvider.authorize(...) method takes a Map<String,Object> parameter, allowing providers to add name-value pairs to this map when the supplied credentials are authenticated. ModeShape takes this map (populated only by the provider that successfully authenticates) and uses it as the Session's attributes. Thus, this technique allows each provider to place their own information in the Session attributes. Also updated the new Reference Guide section that talks about the AuthorizationProvider framework.
    
    JcrRepository can be configured such that any user failing authentication will be authenticated as an anonymous user. The way JcrRepository was tracking this option was not clear, so it was changed to set up an AnonymousCredentials in these situations, and if the user fails authentication with their the AnonymousCredentials then we try to authenticate them anonymously (using the AnonymousCredentials). This was merely an implementation change, so no documentation changes were necessary.
    
    Finally, it is possible to disable the JAAS AuthenticationProvider by specifying a zero-length value for the 'jaasLoginConfigName' option. This was also documented in the associated Reference Guide sections.
    
    Again, out-of-the-box ModeShape works as it did before, except that SecurityContextCredentials are deprecated and authentication with them is DISABLED by default.
    rhauch committed Jul 3, 2011
  5. Merge branch 'MODE-1195' of https://github.com/bcarothers/modeshape i…

    …nto bcarothers-MODE-1195
    rhauch committed Jul 8, 2011
  6. MODE-1195 Error in Reference Guide

    Added some missing ENTITYs.
    bcarothers-xx committed Jul 8, 2011
  7. Merge branch 'MODE-1192' of https://github.com/bcarothers/modeshape i…

    …nto bcarothers-MODE-1192
    rhauch committed Jul 8, 2011
  8. MODE-1192 InfinispanRepository Attempts to Remove Elements from an Im…

    …mutable Set
    
    Copied the response from EmbeddedCacheManager.getCacheNames() into a mutable HashSet.
    bcarothers-xx committed Jul 8, 2011
Commits on Jul 7, 2011
  1. Incorrect datatypes in ModeShape JDBC driver

    Changed the resultset related classes to return jdbc column type name, instead of the jcr name as the column type name.    Also, had to fix the logic to match the uppercase jcr name returned in the query results in order to make the match to the JcrType used to provide the jdbc type.
    vhalbert committed Jul 7, 2011
  2. MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

    Fixed bug in handling of data source property.
    bcarothers-xx committed Jul 7, 2011
  3. MODE-1209 Added JPA caching to the benchmark config

    Changed the connector benchmark ModeShape configuration to have 4 variations of the
    JPA connector and 2nd-level caching: without, with Ehcache, with Infinispan cache, and
    with simple cache. They are still commented out (since they take quite a while to run).
    rhauch committed Jul 7, 2011
  4. MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

    Updated patch to include default persistence configurations for no cache, the simple Hibernate cache, EHCache, and an Infinispan cache.  All configurations are fully documented in the Reference Guide.
    bcarothers-xx committed with rhauch Jul 7, 2011
  5. MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

    Hard-coding a 2LC provider is really easy.  Making it usable is really hard, as Hibernate requires one to provide a CacheConcurrencyStrategy (e.g., read-write, read-only, transactional) and not all cache providers support all strategies.  The CacheConcurrencyStrategy can either be provided in a Hibernate-specifc  annotation at compile-time or in persistence.xml - a much more JPA-friendly mechanism.
    
    Ergo, the attached patch adds the use of a persistence.xml file to help control mappings and Hibernate cache settings for the first time.  That, in turn, required that we use a more JPA-standard way of building an EntityManagerFactory, which required moving a lot of code, but was pretty straightforward.
    
    The idea is that we can now specify a number of different pre-defined cache configurations in our persistence.xml and allow users to pick one by modifying the new jpaPersistenceUnitName property on the JpaSource.  Users can now also override or extend our default configurations by providing their own persistence.xml in their own JAR.
    
    In doing this, I extracted all of the Hibernate-specific code into an implementation of a new interface, JpaAdapter.  This brings us surprisingly close to being able to support other JPA providers with our JPA connector, but we're still using Hibernate-specific annotations to define indexes, and we have to have those indexes.
    
    Feedback on this approach would be greatly appreciated.  If the approach is considered viable, all that remains is to predefine some cache configurations and update the documentation accordingly.
    bcarothers-xx committed with rhauch Jul 3, 2011
  6. MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

    Updated patch to include default persistence configurations for no cache, the simple Hibernate cache, EHCache, and an Infinispan cache.  All configurations are fully documented in the Reference Guide.
    bcarothers-xx committed Jul 7, 2011
Commits on Jul 3, 2011
  1. MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

    Hard-coding a 2LC provider is really easy.  Making it usable is really hard, as Hibernate requires one to provide a CacheConcurrencyStrategy (e.g., read-write, read-only, transactional) and not all cache providers support all strategies.  The CacheConcurrencyStrategy can either be provided in a Hibernate-specifc  annotation at compile-time or in persistence.xml - a much more JPA-friendly mechanism.
    
    Ergo, the attached patch adds the use of a persistence.xml file to help control mappings and Hibernate cache settings for the first time.  That, in turn, required that we use a more JPA-standard way of building an EntityManagerFactory, which required moving a lot of code, but was pretty straightforward.
    
    The idea is that we can now specify a number of different pre-defined cache configurations in our persistence.xml and allow users to pick one by modifying the new jpaPersistenceUnitName property on the JpaSource.  Users can now also override or extend our default configurations by providing their own persistence.xml in their own JAR.
    
    In doing this, I extracted all of the Hibernate-specific code into an implementation of a new interface, JpaAdapter.  This brings us surprisingly close to being able to support other JPA providers with our JPA connector, but we're still using Hibernate-specific annotations to define indexes, and we have to have those indexes.
    
    Feedback on this approach would be greatly appreciated.  If the approach is considered viable, all that remains is to predefine some cache configurations and update the documentation accordingly.
    bcarothers-xx committed Jul 3, 2011
Commits on Jul 1, 2011
  1. MODE-1197 Removed JBoss Maven repository settings from our POM

    Having a "repositories" and "pluginRepositories" sections in our parent POM makes it very difficult (if not impossible) to host the ModeShape artifacts in any other repository, including the Maven central repository.
    
    This change removes those sections from the parent POM and places them in a new "settings.xml" file. This means that developers that don't want to change their "~/.m2/settings.xml" file can simply add the "-s settings.xml" argument to all Maven commands. For details on how to configure Maven, see the http://community.jboss.org/docs/DOC-16545 wiki page.
    
    The following procedure was used to test these changes:
    removed the 'repositories' and 'pluginRepositories' sections from our parent POM;
    1. renamed my '~/.m2/settings.xml' file and '~/.m2/repositories' directory so they wouldn't be used;
    2. added to the root of our codebase a 'settings.xml' file that specified the JBoss Maven repository in the 'repositories' and 'pluginRepositories' sections; and
    3. ran 'mvn -Passembly clean install -s settings.xml' to successfully build all artifacts (except JavaDoc and assemblies), downloading everything Maven needed (i.e., the whole internet)
    
    The build worked fine.
    rhauch committed Jun 15, 2011
  2. MODE-1181 Add Benchmark to track connector performance over time

    Added simple framework for benchmark testing of connectors. The benchmark runs a series of tests against
    all of the connectors configured within a single ModeShapeEngine, and then generates an HTML report
    with a graph for each test showing the performance of each connector.
    bcarothers-xx committed with rhauch Jul 1, 2011
Commits on Jun 30, 2011
  1. MODE-1206 Add Ability to Specify Temporary Storage Area on File Syste…

    …m Connector
    
    Added a new property, temporaryStoragePath, to FileSystemSource and then modified FileSystemWorkspace.putNode to use this directory instead of just creating a pending file.  All tests pass.
    bcarothers-xx committed with rhauch Jun 26, 2011
Commits on Jun 21, 2011
  1. MODE-1203 Support Node Caching in Connectors

    The attached patch generalizes the earlier work towards a cache for the disk-based connector into a generic cache framework that can be used for the DiskSource, FileSystemSource, JdbcMetadataSource, and the SvnRepositorySource.  The InMemoryRepositorySource, InfinispanSource, and JBossCacheSource were not modified because they already store data in-memory and aren't likely to benefit from a node cache.  The JpaSource was not modified because it still uses the old map connector framework.  A decision should be made on whether to port that source forward into the new connector framework before caching is added.
    
    A working cache implementation, InMemoryNodeCache is provided along with two working cache policies: InMemoryNodeCache$MapCachePolicy and InMemoryNodeCache$PathCachePolicy.  Connectors can use this cache by setting the nodeCachePolicy property on the connector to the classname of one of these implementations and setting the timeToLive property on the _cachePolicy_ (not on the source itself) to the length of time in seconds that nodes should remain in the cache.  Nodes are added to the cache on reads and writes.  Cache configurations have been added to the Reference Guide for each of the affected connectors.
    
    IMPORTANT: THE CACHE POLICY MUST CORRESPOND TO THE CONNECTOR TYPE.  That is, path connectors must use a cache policy that creates caches that implement PathNodeCache, and map connectors must use a cache policy that creates caches that implement NodeCache.
    
    All tests pass.
    bcarothers-xx committed with rhauch Jun 21, 2011
Commits on Jun 20, 2011
  1. MODE-1201 Using InMemoryBinary when writing to a repository can cause…

    … heap/memory problems writing large files
    
    Attached a very crude patch that creates a new kind of Binary implementation that will lazily wrap a FileInputStream to avoid trying to load it into memory and a test case that duplicates the issue.  The patch has some problems.  It is hacked into JcrValueFactory, it violates the immutability contract that Binary implementations are supposed to implement, and it only works for FileInputStreams.  The last issue may not be a real problem, as I can't think of another InputStream at this moment that wouldn't also be subject to heapsize limitations.
    
    Nonetheless, it works around this issue, and this issue is going to pretty important for ModeShape when it's used as an enterprise repository's backing store.
    bcarothers-xx committed with rhauch Jun 19, 2011
  2. MODE-1193 - fix formatting issues

    vhalbert committed with rhauch Jun 17, 2011
  3. MODE-1193 - Changed logging to support JDK Logger as the default when…

    … log4j binding is not available
    vhalbert committed with rhauch Jun 13, 2011
Commits on Jun 16, 2011
  1. MODE-1199: Fixed tag name

    gastaldi committed with rhauch Jun 16, 2011
Commits on Jun 15, 2011
  1. MODE-1198 Copyright and License header still refers to JBoss DNA

    - Replaced the copyright headers to reflect the project name ModeShape
    vijaykiran committed Jun 15, 2011