extensions

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Changed OSGI version to fix MEAD build.

  1. … 2 more files in changeset.
MODE-1414 (related): promote version #'s in 2.5.x to 2.5.4.GA for BZ-786561 Roll up patch fro EDS_5.2_20120320

    • -1
    • +1
    ./modeshape-connector-filesystem/pom.xml
    • -1
    • +1
    ./modeshape-connector-infinispan/pom.xml
    • -1
    • +1
    ./modeshape-connector-jbosscache/pom.xml
    • -1
    • +1
    ./modeshape-connector-jdbc-metadata/pom.xml
    • -1
    • +1
    ./modeshape-connector-store-jpa/pom.xml
    • -1
    • +1
    ./modeshape-mimetype-detector-aperture/pom.xml
    • -1
    • +1
    ./modeshape-sequencer-classfile/pom.xml
  1. … 54 more files in changeset.
MODE-1414 XMI model sequencer corrected to prevent NPEs

In certain cases, XMI models might contain references to the annotated objects not

as XML attributes but as child elements. (This bifurcated design is considered a

benefit to XMI, though not sure why.) Anyway, the problem appears to be that a virtual

model contains an (empty) "annoation" for the physical model. It's not clear to me

why the Designer would produce such an annotation.

Additional tests were added to reproduce the problem with the original models and VDB.

After the fix, the tests pass as expected.

All unit and integration tests pass with these changes.

    • -0
    • +607
    ./modeshape-sequencer-teiid/src/test/resources/model/bqt/oraclev.xmi
MODE-1353: promote version #'s in 2.5.x to 2.5.3.GA for SOA-3656

    • -1
    • +1
    ./modeshape-connector-filesystem/pom.xml
    • -1
    • +1
    ./modeshape-connector-infinispan/pom.xml
    • -1
    • +1
    ./modeshape-connector-jbosscache/pom.xml
    • -1
    • +1
    ./modeshape-connector-jdbc-metadata/pom.xml
    • -1
    • +1
    ./modeshape-connector-store-jpa/pom.xml
    • -1
    • +1
    ./modeshape-mimetype-detector-aperture/pom.xml
    • -1
    • +1
    ./modeshape-sequencer-classfile/pom.xml
  1. … 54 more files in changeset.
MODE-1296 - The properties were being added under the transform:transformed mixin, instead of transform:withSql

Changed version to 2.5.2.GA, in preparation for release.

    • -1
    • +1
    ./modeshape-connector-filesystem/pom.xml
    • -1
    • +1
    ./modeshape-connector-infinispan/pom.xml
    • -1
    • +1
    ./modeshape-connector-jbosscache/pom.xml
    • -1
    • +1
    ./modeshape-connector-jdbc-metadata/pom.xml
    • -1
    • +1
    ./modeshape-connector-store-jpa/pom.xml
    • -1
    • +1
    ./modeshape-mimetype-detector-aperture/pom.xml
    • -1
    • +1
    ./modeshape-sequencer-classfile/pom.xml
  1. … 59 more files in changeset.
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.

  1. … 5 more files in changeset.
MODE-1251 Downgrade Hibernate to 3.3.2

Downgraded our use of Hibernate (only on the 2.5.x branch) to 3.3.2.GA and made one change to the POM

and to the HibernateAdapter class, which was using an API introduced in Hibernate in 3.5.

All unit and integration tests pass with these changes.

    • -6
    • +0
    ./modeshape-connector-store-jpa/pom.xml
  1. … 1 more file in changeset.
MODE-1201 Reverted the addition of FileInputStreamBinary

Reverted the change to add a FileInputStreamBinary class. This change caused problems when the

BINARY value is read more than once and when stored in the In-Memory, Infinispan, JBoss Cache

and similar connectors (since they attempt to store the read-only-once value, preventing

reading the value back out). See MODE-1241 for details.

This reverts commit 51403d529df39d5d9d1c83f4e4d68190bbb708c4 and also deletes the

LargeFileTest.java test (perhaps added after 51403d?)

  1. … 6 more files in changeset.
MODE-1249 the maxPathLength property was being picked up from the configuration file

  1. … 3 more files in changeset.
MODE-1250 Upgrade Apache POI to 3.7

The MS Office sequencer is using a different value of Apache POI than is being inherited from the Tika library used in the Tika Text Extractor module. This change upgrade the sequencer to also use 3.7, adds several unit and integration tests, and also makes a number of fixes to the way the sequencer works.

All unit and integration tests pass with these changes.

    • -2
    • +9
    ./modeshape-sequencer-msoffice/pom.xml
  1. … 5 more files in changeset.
MODE-1241 Corrected duplicate serialization of properties in JPA source

The JPA source was handling UpdatePropertyRequests by iterating through its properties and then removing or

updating the property on the JPA node. Each time a property was modified (removed or added or updated), all

of the nodes properties were serialized. This not only is WAY more work than needed, but it causes a

problem when a file backed Binary value is used (since the first serialization closes the backing stream,

and subsequent serialization attempts to use the closed stream).

This was fixed by simply changing how the UpdatePropertyRequests are handled in MapRequestProcessor to

update and remove all of the appropriate properties in one shot, via a modified 'setProperties' method on

the MapNode, DefaultMapNode, and JpaNode. Because the MapNode interface was changed, several other uses

required modification.

Van's test case was able to duplicate the problem prior to these changes. After these changes, all

unit and integration tests pass.

  1. … 7 more files in changeset.
MODE-1234 Corrected indexing and querying of BOOLEAN properties

Query nodes based upon custom node types with BOOLEAN properties did work, whereas querying nodes based upon built-in node types with BOOLEAN properties did not work. This fix corrects one error in the way properties are indexed, and another in how constraints against BOOLEAN properties are transformed into Lucene queries. These two errors cancelled each other out for properties on custom node types, but caused issues with properties on built-ins.

Once this fix is applied (through an upgrade to 2.6.0.Final, the indexes should be rebuilt to correct the existing indexes.

All unit and integration tests pass, including several new tests written to duplicate/verify the problem.

  1. … 7 more files in changeset.
MODE-1232 Add support for REFERENCE nodes to FS connector

Added support in the file system connector for handling 'mix:referenceable' nodes and correctly handling the 'jcr:uuid' property. The connector still does not handle finding nodes by identifier (e.g., UUID).

Also changed the JcrSession (and associated classes) to better handle looking up nodes by identifier if the connector doesn't support doing so. In such cases, the JcrSession performs a query to search for the path of the node given the UUID, and then looks up the node by path. Note that when the referenceable nodes are still in the session's transient state, the session is now able to find them without resorting to the connector or queries.

A new integration test case was added to test for this functionality. Prior to the above fixes, this test case failed (as expected); after the above fixes, the test case passes.

All unit and integration tests pass.

  1. … 7 more files in changeset.
MODE-1224 Improve startup time of Repository

Several changes were made to improve the startup time of the ModeShape engine and Repository instances, especially when starting up after the first shutdown.

The JPA connector was improved to eliminate a dual-connection startup mode that attempted to discover the model before establishing the actual connection. This will have a noticeable impact when starting up with 'autoGenerateSchema' properties of 'update' or 'validate', since before this change both connection phases performed the update and/or validation. Now that there is only a single connection phase, the update and/or validation will only be performed once.

This change also improves the process of reading the existing node types during JcrRepository startup. Prior to this change, the existing node types were read from the '/jcr:system' area and the built-ins were always loaded from a CND on the classpath, replacing any "incorrect" or "invalid" built-in node type that was stored in '/jcr:system'. Now, the existing node types are read from the '/jcr:system' area and used as is, without overwriting the built-ins. This was thought to better accept any existing node types configured by the user, and will perhaps come into play when a user upgrades from 2.x to 3.x (assuming there are changes to the built-ins). As a result, users will be responsible for updating the built-in node types using the standard NodeTypeManager.registerNodeTypes(…) methods.

Several automated and manual integration tests were modified before these changes to allow better measurement of the startup times. Some test utility methods (e.g., simulation of Guvnor activities) were refactored so they could be more easily used in multiple (kinds of) tests.

All unit and integration tests pass with these changes, and a full build (e.g., "mvn install -Pintegration") appears to take 1 minute less.

  1. … 7 more files in changeset.
MODE-1191 Updated the documentation formatting

All of the tables used in connector chapters were changed to variable lists, which seem to format better

(since the tables didn't have lines between rows). Also added a link to the Hiberante dialects

to address MODE-1191.

  1. … 13 more files in changeset.
Fixed compilation warnings

MODE-1225 Changed the UTC_TIMESTAMP name in ChangeLogEntity and also deprecated the class. And removed ChangeLogEntity from being added to the EntityManagerFactory in HibernateAdapter.getEntityManagerFactory(JpaSource) method

MODE-1214 modeshape-connector-store-jpa issue when trying to start JBoss AS 5.1

Fixed default cacheProviderClassName value to 'null' on JpaSource.

  1. … 1 more file in changeset.
MODE-1212 Clean up unit/integration tests that uses SecurityContextCredentials

Attached patch removes all test uses of SecurityContextCredentials and replaces custom RepositoryContext implementations with MockRepositoryContext where possible. All tests pass.

  1. … 18 more files in changeset.
MODE-1214 modeshape-connector-store-jpa issue when trying to start JBoss 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.

  1. … 1 more file in changeset.
MODE-1192 InfinispanRepository Attempts to Remove Elements from an Immutable Set

Copied the response from EmbeddedCacheManager.getCacheNames() into a mutable HashSet.

MODE-1209 Add Support for Hibernate 2nd Level Cache to JPA Connector

Fixed bug in handling of data source property.

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.

    • -0
    • +18
    ./modeshape-connector-store-jpa/pom.xml
  1. … 1 more file in changeset.
MODE-1193, MODE-1203 Corrected compiler warnings

  1. … 13 more files in changeset.
MODE-1107, MODE-1205 Added support for pluggable authorization and authentication

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.

  1. … 46 more files in changeset.
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.

  1. … 10 more files in changeset.
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.

  1. … 7 more files in changeset.
MODE-1206 Add Ability to Specify Temporary Storage Area on File System 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.

  1. … 2 more files in changeset.
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.

  1. … 28 more files in changeset.