You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/10/28 17:20:09 UTC

[1/3] git commit: ISIS-576: improving JDO exception recognizer for sql constraints

Updated Branches:
  refs/heads/master c828010fd -> 9bc9cf691


ISIS-576: improving JDO exception recognizer for sql constraints

- only if unique/index constraint thrown, otherwise ignore


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/b258ca1a
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/b258ca1a
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/b258ca1a

Branch: refs/heads/master
Commit: b258ca1a20409675b2361470b60851673a6c0e8d
Parents: c828010
Author: Dan Haywood <da...@apache.org>
Authored: Mon Oct 28 16:17:20 2013 +0000
Committer: Dan Haywood <da...@apache.org>
Committed: Mon Oct 28 16:17:20 2013 +0000

----------------------------------------------------------------------
 ...ionRecognizerCompositeForJdoObjectStore.java |  2 +-
 ...QLIntegrityConstraintViolationException.java | 30 -----------
 ...nstraintViolationUniqueOrIndexException.java | 30 +++++++++++
 ...tegrityConstraintViolationExceptionTest.java | 52 ++++++++++++++++++++
 .../exceprecog/ExceptionRecognizerForType.java  | 30 +++++++++++
 5 files changed, 113 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/b258ca1a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
index c98b097..d7a4a2e 100644
--- a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
+++ b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerCompositeForJdoObjectStore.java
@@ -36,7 +36,7 @@ public class ExceptionRecognizerCompositeForJdoObjectStore extends ExceptionReco
     
     public ExceptionRecognizerCompositeForJdoObjectStore() {
         // most specific ones first
-        add(new ExceptionRecognizerForSQLIntegrityConstraintViolationException());
+        add(new ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException());
         add(new ExceptionRecognizerForJDOObjectNotFoundException());
         add(new ExceptionRecognizerForJDODataStoreException());
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/b258ca1a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationException.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationException.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationException.java
deleted file mode 100644
index 934eaf6..0000000
--- a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.objectstore.jdo.applib.service.exceprecog;
-
-import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerForType;
-
-public class ExceptionRecognizerForSQLIntegrityConstraintViolationException extends ExceptionRecognizerForType {
-
-    public ExceptionRecognizerForSQLIntegrityConstraintViolationException() {
-        super(java.sql.SQLIntegrityConstraintViolationException.class, 
-                prefix("Data already exists"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/b258ca1a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException.java
new file mode 100644
index 0000000..eadaa30
--- /dev/null
+++ b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException.java
@@ -0,0 +1,30 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.objectstore.jdo.applib.service.exceprecog;
+
+import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerForType;
+
+public class ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException extends ExceptionRecognizerForType {
+
+    public ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException() {
+        super(ofTypeIncluding(java.sql.SQLIntegrityConstraintViolationException.class, "unique constraint or index violation"), 
+                prefix("Data already exists"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b258ca1a/component/objectstore/jdo/jdo-applib/src/test/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationExceptionTest.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/test/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationExceptionTest.java b/component/objectstore/jdo/jdo-applib/src/test/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationExceptionTest.java
new file mode 100644
index 0000000..35d8f5c
--- /dev/null
+++ b/component/objectstore/jdo/jdo-applib/src/test/java/org/apache/isis/objectstore/jdo/applib/service/exceprecog/ExceptionRecognizerForSQLIntegrityConstraintViolationExceptionTest.java
@@ -0,0 +1,52 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.objectstore.jdo.applib.service.exceprecog;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+import java.sql.SQLIntegrityConstraintViolationException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ExceptionRecognizerForSQLIntegrityConstraintViolationExceptionTest {
+
+    private ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException exceptionRecognizer;
+
+    @Before
+    public void setUp() throws Exception {
+        exceptionRecognizer = new ExceptionRecognizerForSQLIntegrityConstraintViolationUniqueOrIndexException();
+    }
+    
+    @Test
+    public void uniqueConstraintOrIndexViolation() throws Exception {
+        final String msg = "initial gumph: unique constraint or index violation; further details";
+        final SQLIntegrityConstraintViolationException ex = new SQLIntegrityConstraintViolationException(msg);
+        String recognize = exceptionRecognizer.recognize(ex);
+        assertThat(recognize, is("Data already exists<br/><br/>" + msg));
+    }
+
+    @Test
+    public void notNullCheckConstraintViolation() throws Exception {
+        final String msg = "initial gumph: NOT NULL check constraint; further details";
+        final SQLIntegrityConstraintViolationException ex = new SQLIntegrityConstraintViolationException(msg);
+        String recognize = exceptionRecognizer.recognize(ex);
+        assertThat(recognize, is(nullValue()));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b258ca1a/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerForType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerForType.java b/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerForType.java
index 76760a3..4ed5a26 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerForType.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerForType.java
@@ -44,6 +44,10 @@ public class ExceptionRecognizerForType extends ExceptionRecognizerDelegating {
         return Predicates.and(ofType(exceptionType), excluding(messages));
     }
 
+    protected final static Predicate<Throwable> ofTypeIncluding(final Class<? extends Throwable> exceptionType, final String... messages) {
+        return Predicates.and(ofType(exceptionType), including(messages));
+    }
+    
     protected final static Predicate<Throwable> ofType(final Class<? extends Throwable> exceptionType) {
         return new Predicate<Throwable>() {
             @Override
@@ -79,6 +83,32 @@ public class ExceptionRecognizerForType extends ExceptionRecognizerDelegating {
         };
     }
 
+    /**
+     * A {@link Predicate} that {@link Predicate#apply(Object) applies} only if at least one of the message(s)
+     * supplied <i>DO</i> appear in the {@link Throwable} or any of its {@link Throwable#getCause() cause}s
+     * (recursively).
+     * 
+     * <p>
+     * Intended to prevent more precise matching of a specific general exception type.
+     */
+    protected final static Predicate<Throwable> including(final String... messages) {
+        return new Predicate<Throwable>() {
+            @Override
+            public boolean apply(Throwable input) {
+                final List<Throwable> causalChain = Throwables.getCausalChain(input);
+                for (String message : messages) {
+                    for (Throwable throwable : causalChain) {
+                        final String throwableMessage = throwable.getMessage();
+                        if(throwableMessage != null && throwableMessage.contains(message)) {
+                            return true;
+                        }
+                    }
+                }
+                return false;
+            }
+        };
+    }
+
     public ExceptionRecognizerForType(final Class<? extends Exception> exceptionType, final Function<String,String> messageParser) {
         this(ofType(exceptionType), messageParser);
     }


[3/3] git commit: ISIS-570: error in JGrowl javascript causing drop-downs to not render correctly.

Posted by da...@apache.org.
ISIS-570: error in JGrowl javascript causing drop-downs to not render correctly.

In addition:
- made the bookmark panel close more quickly


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/9bc9cf69
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/9bc9cf69
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/9bc9cf69

Branch: refs/heads/master
Commit: 9bc9cf6910019ffa6b03f393ba88ce46bd09865a
Parents: 6ad65ff
Author: Dan Haywood <da...@apache.org>
Authored: Mon Oct 28 16:19:37 2013 +0000
Committer: Dan Haywood <da...@apache.org>
Committed: Mon Oct 28 16:19:37 2013 +0000

----------------------------------------------------------------------
 .../viewer/wicket/ui/components/actions/ActionPanel.java     | 2 ++
 .../wicket/ui/components/bookmarkedpages/slide-panel.js      | 8 ++++----
 .../org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java  | 5 +++--
 .../org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java | 3 ++-
 4 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/9bc9cf69/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
index 9527f92..1bf070e 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
@@ -225,6 +225,8 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
             String message = recognizeException(ex, feedbackForm);
             
             if (message != null) {
+                // no need to add to message broker, should already have been added...
+                
                 if(feedbackForm == null) {
                     // forward on instead to void page
                     // (otherwise, we'll have rendered an action parameters page 

http://git-wip-us.apache.org/repos/asf/isis/blob/9bc9cf69/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/slide-panel.js
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/slide-panel.js b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/slide-panel.js
index c467bcc..bd638b2 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/slide-panel.js
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/slide-panel.js
@@ -20,17 +20,17 @@ $(document).ready(function(){
  
     var showBookmarks = function(){
         $('#bookmarkedPagesSlidingDiv').stop().animate(
-            {width:"400px", opacity:0.95}, 250, 
+            {width:"300px", opacity:0.95}, 100, 
             function() {
-                $('.content').fadeIn('125');
+                $('.content').fadeIn('50');
             });
         $('.showPanelTab').animate({opacity: 0.5});
     };
 
     var hideBookmarks = function(){
-        $('.content').fadeOut('125', 
+        $('.content').fadeOut('0', 
             function() { 
-                $('#bookmarkedPagesSlidingDiv').stop().animate({width:"0", opacity:0.1}, 125);
+                $('#bookmarkedPagesSlidingDiv').stop().animate({width:"0", opacity:0.1}, 0);
             });
          $('.showPanelTab').animate({opacity: 1.0});
      };

http://git-wip-us.apache.org/repos/asf/isis/blob/9bc9cf69/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java
index 1261a2a..e049695 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/errors/JGrowlUtil.java
@@ -41,10 +41,11 @@ public class JGrowlUtil {
         return buf.toString();
     }
 
-    private static void addJGrowlCall(final String msg, final String cssClassSuffix, boolean sticky, final StringBuilder buf) {
+    private static void addJGrowlCall(final String msg2, final String cssClassSuffix, boolean sticky, final StringBuilder buf) {
+        final String msg = msg2.replaceAll("\"", "\'");
         buf.append("$.jGrowl(\"").append(msg).append('\"');
         buf.append(", {");
-        buf.append("theme: \'jgrowl-").append(cssClassSuffix).append("\'");
+        buf.append("theme: \"jgrowl-").append(cssClassSuffix).append("\"");
         if (sticky) {
             buf.append(", sticky: true");
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/9bc9cf69/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
index e589df0..d882b17 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
@@ -186,7 +186,8 @@ public abstract class PageAbstract extends WebPage {
         
         final String feedbackMsg = JGrowlUtil.asJGrowlCalls(getMessageBroker());
         if (!Strings.isNullOrEmpty(feedbackMsg)) {
-            response.render(OnDomReadyHeaderItem.forScript(feedbackMsg));
+            final OnDomReadyHeaderItem forScript = OnDomReadyHeaderItem.forScript(feedbackMsg);
+            response.render(forScript);
         }
         
         if(applicationCss != null) {


[2/3] git commit: ISIS-577: specify length of cols for PublishedEvent, *Settings

Posted by da...@apache.org.
ISIS-577: specify length of cols for PublishedEvent, *Settings


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/6ad65ffb
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/6ad65ffb
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/6ad65ffb

Branch: refs/heads/master
Commit: 6ad65ffb9fcb2c0914f73b38a00f5cbae62b3dfa
Parents: b258ca1
Author: Dan Haywood <da...@apache.org>
Authored: Mon Oct 28 16:18:15 2013 +0000
Committer: Dan Haywood <da...@apache.org>
Committed: Mon Oct 28 16:18:15 2013 +0000

----------------------------------------------------------------------
 .../jdo/applib/service/publish/PublishedEvent.java  |  8 +++++---
 .../service/settings/ApplicationSettingJdo.java     | 10 ++++++----
 .../jdo/applib/service/settings/UserSettingJdo.java | 16 +++++++++-------
 3 files changed, 20 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/6ad65ffb/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/publish/PublishedEvent.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/publish/PublishedEvent.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/publish/PublishedEvent.java
index 1b0c65c..f641d12 100644
--- a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/publish/PublishedEvent.java
+++ b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/publish/PublishedEvent.java
@@ -54,7 +54,7 @@ public class PublishedEvent {
 
     private String title;
 
-    @javax.jdo.annotations.Column(allowsNull="false")
+    @javax.jdo.annotations.Column(allowsNull="false", length=50)
     @Title
     @Hidden
     public String getTitle() {
@@ -82,6 +82,7 @@ public class PublishedEvent {
 
     private String id;
 
+    @javax.jdo.annotations.Column(length=32)
     @javax.jdo.annotations.PrimaryKey
     @MemberOrder(sequence = "2")
     public String getId() {
@@ -99,6 +100,7 @@ public class PublishedEvent {
     /**
      * Programmatic because information also available in the {@link #getId() id}.
      */
+    @javax.jdo.annotations.Column(length=32)
     @Programmatic
     public String getTransactionId() {
         return transactionId;
@@ -142,7 +144,7 @@ public class PublishedEvent {
 
     private String user;
     
-    @javax.jdo.annotations.Column(allowsNull="false")
+    @javax.jdo.annotations.Column(allowsNull="false", length=50)
     @MemberOrder(sequence = "4")
     public String getUser() {
         return user;
@@ -156,7 +158,7 @@ public class PublishedEvent {
 
     private State state;
 
-    @javax.jdo.annotations.Column(allowsNull="false")
+    @javax.jdo.annotations.Column(allowsNull="false", length=20)
     @MemberOrder(sequence = "5")
     public State getState() {
         return state;

http://git-wip-us.apache.org/repos/asf/isis/blob/6ad65ffb/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/ApplicationSettingJdo.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/ApplicationSettingJdo.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/ApplicationSettingJdo.java
index 8e66bf7..aa9a55a 100644
--- a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/ApplicationSettingJdo.java
+++ b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/ApplicationSettingJdo.java
@@ -44,6 +44,7 @@ import org.apache.isis.applib.services.settings.SettingType;
 @Named("Application Setting")
 public class ApplicationSettingJdo extends SettingAbstractJdo implements ApplicationSetting {
 
+    @javax.jdo.annotations.Column(length=128)
     @javax.jdo.annotations.PrimaryKey
     public String getKey() {
         return super.getKey();
@@ -55,7 +56,8 @@ public class ApplicationSettingJdo extends SettingAbstractJdo implements Applica
 
     // //////////////////////////////////////
 
-    @Persistent
+    @javax.jdo.annotations.Column(length=254)
+    @javax.jdo.annotations.Persistent
     @Override
     public String getDescription() {
         return super.getDescription();
@@ -68,7 +70,7 @@ public class ApplicationSettingJdo extends SettingAbstractJdo implements Applica
     // //////////////////////////////////////
 
     @javax.jdo.annotations.Column(allowsNull="false")
-    @Persistent
+    @javax.jdo.annotations.Persistent
     @Override
     public String getValueRaw() {
         return super.getValueRaw();
@@ -80,8 +82,8 @@ public class ApplicationSettingJdo extends SettingAbstractJdo implements Applica
     
     // //////////////////////////////////////
 
-    @javax.jdo.annotations.Column(allowsNull="false")
-    @Persistent
+    @javax.jdo.annotations.Column(allowsNull="false", length=20)
+    @javax.jdo.annotations.Persistent
     @Override
     public SettingType getType() {
         return super.getType();

http://git-wip-us.apache.org/repos/asf/isis/blob/6ad65ffb/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/UserSettingJdo.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/UserSettingJdo.java b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/UserSettingJdo.java
index c46e7a4..128777d 100644
--- a/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/UserSettingJdo.java
+++ b/component/objectstore/jdo/jdo-applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/settings/UserSettingJdo.java
@@ -61,8 +61,9 @@ public class UserSettingJdo extends SettingAbstractJdo implements UserSetting {
     
     private String user;
 
+    @javax.jdo.annotations.Column(length=50)
+    @javax.jdo.annotations.PrimaryKey
     @Title(sequence="5", append=": ")
-    @PrimaryKey
     @MemberOrder(sequence = "5")
     public String getUser() {
         return user;
@@ -74,8 +75,9 @@ public class UserSettingJdo extends SettingAbstractJdo implements UserSetting {
 
     // //////////////////////////////////////
 
+    @javax.jdo.annotations.Column(length=128)
+    @javax.jdo.annotations.PrimaryKey
     @Title(sequence="10")
-    @PrimaryKey
     @Override
     public String getKey() {
         return super.getKey();
@@ -87,7 +89,8 @@ public class UserSettingJdo extends SettingAbstractJdo implements UserSetting {
 
     // //////////////////////////////////////
 
-    @Persistent
+    @javax.jdo.annotations.Column(length=254)
+    @javax.jdo.annotations.Persistent
     @Override
     public String getDescription() {
         return super.getDescription();
@@ -100,13 +103,12 @@ public class UserSettingJdo extends SettingAbstractJdo implements UserSetting {
     // //////////////////////////////////////
 
     @javax.jdo.annotations.Column(allowsNull="false")
+    @javax.jdo.annotations.Persistent
     @Title(prepend=" = ", sequence="30")
-    @Persistent
     @Override
     public String getValueRaw() {
         return super.getValueRaw();
     }
-    @Persistent
     @Override
     public void setValueRaw(String valueAsRaw) {
         super.setValueRaw(valueAsRaw);
@@ -114,8 +116,8 @@ public class UserSettingJdo extends SettingAbstractJdo implements UserSetting {
     
     // //////////////////////////////////////
 
-    @javax.jdo.annotations.Column(allowsNull="false")
-    @Persistent
+    @javax.jdo.annotations.Column(allowsNull="false", length=20)
+    @javax.jdo.annotations.Persistent
     @Override
     public SettingType getType() {
         return super.getType();