[infinispan-dev] wf config

Paul Ferraro paul.ferraro at redhat.com
Wed Jan 29 08:42:13 EST 2014


Ooops.  That's a bug - I'll submit a PR momentarily.

On Wed, 2014-01-29 at 13:08 +0100, Ales Justin wrote:
> I'm looking at current WildFly integration.
> 
> In CacheAdd I see this code:
> 
>         if ((lockingMode == LockingMode.OPTIMISTIC) && (isolationLevel == IsolationLevel.REPEATABLE_READ)) {
>             builder.locking().writeSkewCheck(true);
>         }
> 
> but then locking has this validation:
> 
>    public void validate() {
>       if (writeSkewCheck) {
>          if (isolationLevel != IsolationLevel.REPEATABLE_READ)
>             throw new CacheConfigurationException("Write-skew checking only allowed with REPEATABLE_READ isolation level for cache");
>          if (transaction().lockingMode != LockingMode.OPTIMISTIC)
>             throw new CacheConfigurationException("Write-skew checking only allowed with OPTIMISTIC transactions");
>          if (!versioning().enabled || versioning().scheme != VersioningScheme.SIMPLE)
>             throw new CacheConfigurationException(
>                   "Write-skew checking requires versioning to be enabled and versioning scheme 'SIMPLE' to be configured");
> 
> Yet there is no versioning handling in WF subsystem.
> (just listing what's supported)
> 
>     private void parseCacheElement(XMLExtendedStreamReader reader, Element element, ModelNode cache, List<ModelNode> operations) throws XMLStreamException {
>         switch (element) {
>             case LOCKING: {
>             case TRANSACTION: {
>             case EVICTION: {
>             case EXPIRATION: {
>             case STORE: {
>             case FILE_STORE: {
>             case STRING_KEYED_JDBC_STORE: {
>             case BINARY_KEYED_JDBC_STORE: {
>             case MIXED_KEYED_JDBC_STORE: {
>             case REMOTE_STORE: {
>             case INDEXING: {
>             default: {
>                 throw ParseUtils.unexpectedElement(reader);
>     }
> 
> How do you expect the user to get pass the validation,
> where you magically enable writeSkewCheck?
> 
> -Ales
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list