You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2018/08/22 09:24:11 UTC

[1/5] tomee git commit: TOMEE-2221 - Added Johnzon Jsonb Provider.

Repository: tomee
Updated Branches:
  refs/heads/tomee-7.1.x 11b75830c -> d7b3168c0


TOMEE-2221 - Added Johnzon Jsonb Provider.

(cherry picked from commit 95cfcc2)


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

Branch: refs/heads/tomee-7.1.x
Commit: 0fa51f4234b6714e0de0b8543cc8b5af51045855
Parents: abfc263
Author: Roberto Cortez <ra...@yahoo.com>
Authored: Thu Aug 2 15:12:24 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Tue Aug 21 12:24:19 2018 +0100

----------------------------------------------------------------------
 server/openejb-cxf-rs/pom.xml                                     | 3 ---
 .../main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java  | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/0fa51f42/server/openejb-cxf-rs/pom.xml
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/pom.xml b/server/openejb-cxf-rs/pom.xml
index 429a25d..9bfe972 100644
--- a/server/openejb-cxf-rs/pom.xml
+++ b/server/openejb-cxf-rs/pom.xml
@@ -118,14 +118,11 @@
       <artifactId>johnzon-jaxrs</artifactId>
       <version>${johnzon.version}</version>
     </dependency>
-    <!-- java 8 only, we can add it if we instantiate it after having checked java
-    NOTE: needs jsonb-api too (available in jonzon groupId)
     <dependency>
       <groupId>org.apache.johnzon</groupId>
       <artifactId>johnzon-jsonb</artifactId>
       <version>${johnzon.version}</version>
     </dependency>
-    -->
     <dependency>
       <groupId>org.codehaus.jettison</groupId>
       <artifactId>jettison</artifactId>

http://git-wip-us.apache.org/repos/asf/tomee/blob/0fa51f42/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
index 31bd2e0..2d7a55f 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
@@ -224,6 +224,7 @@ public class CxfRSService extends RESTService {
 
             final Collection<Object> defaults = new ArrayList<>();
             for (final String provider : asList(
+                    "org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider",
                     "org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider",
                     "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider")) {
                 if (!isActive(provider)) {


[5/5] tomee git commit: Merge branch 'tomee-7.1.x' of github.com:radcortez/tomee into tomee-7.1.x

Posted by jg...@apache.org.
Merge branch 'tomee-7.1.x' of github.com:radcortez/tomee into tomee-7.1.x


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

Branch: refs/heads/tomee-7.1.x
Commit: d7b3168c054cb729445c20f1d5441c1e41c7a0c0
Parents: 11b7583 9f7b50f
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Aug 22 10:23:42 2018 +0100
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Aug 22 10:23:42 2018 +0100

----------------------------------------------------------------------
 server/openejb-cxf-rs/pom.xml                   |   8 +-
 .../openejb/server/cxf/rs/CxfRSService.java     |   2 +-
 .../TomEEJsonbPropertyVisibilityStrategy.java   |  88 +++++++++++++
 .../cxf/rs/johnzon/TomEEJsonbProvider.java      |  33 +++++
 .../cxf/rs/johnzon/JsonbJaxrsProviderTest.java  | 127 +++++++++++++++++++
 5 files changed, 254 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[4/5] tomee git commit: TOMEE-2221 - Integration for TomEE 7.1.x.

Posted by jg...@apache.org.
TOMEE-2221 - Integration for TomEE 7.1.x.


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

Branch: refs/heads/tomee-7.1.x
Commit: 9f7b50fa4030b2babbe6f6a672d81246c6e67941
Parents: 75d0efc
Author: Roberto Cortez <ra...@yahoo.com>
Authored: Tue Aug 21 13:12:26 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Tue Aug 21 13:12:26 2018 +0100

----------------------------------------------------------------------
 server/openejb-cxf-rs/pom.xml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/9f7b50fa/server/openejb-cxf-rs/pom.xml
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/pom.xml b/server/openejb-cxf-rs/pom.xml
index 9bfe972..f1e7064 100644
--- a/server/openejb-cxf-rs/pom.xml
+++ b/server/openejb-cxf-rs/pom.xml
@@ -119,6 +119,11 @@
       <version>${johnzon.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jsonb_1.0_spec</artifactId>
+      <version>${jsonb.api.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.johnzon</groupId>
       <artifactId>johnzon-jsonb</artifactId>
       <version>${johnzon.version}</version>


[2/5] tomee git commit: TOMEE-2221 - Improved compatibility between Johnzon and Jsonb Provider. Added Jsonb PropertyVisibilityStrategy to also map objects annotated with Johnzon annotations. Added TomEE Provider to control CXF Provider order.

Posted by jg...@apache.org.
TOMEE-2221 - Improved compatibility between Johnzon and Jsonb Provider.
Added Jsonb PropertyVisibilityStrategy to also map objects annotated with Johnzon annotations.
Added TomEE Provider to control CXF Provider order.

(cherry picked from commit a44f123)


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

Branch: refs/heads/tomee-7.1.x
Commit: 82472058c8052bbf18874feb732a9b7ad4f41ab6
Parents: 0fa51f4
Author: Roberto Cortez <ra...@yahoo.com>
Authored: Fri Aug 10 18:02:34 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Tue Aug 21 12:24:23 2018 +0100

----------------------------------------------------------------------
 .../openejb/server/cxf/rs/CxfRSService.java     |   3 +-
 .../TomEEJsonbPropertyVisibilityStrategy.java   |  88 ++++++++++++++++
 .../cxf/rs/johnzon/TomEEJsonbProvider.java      |  33 ++++++
 .../cxf/rs/johnzon/JsonbJaxrsProviderTest.java  | 103 +++++++++++++++++++
 4 files changed, 225 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/82472058/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
index 2d7a55f..347f42b 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
@@ -224,8 +224,7 @@ public class CxfRSService extends RESTService {
 
             final Collection<Object> defaults = new ArrayList<>();
             for (final String provider : asList(
-                    "org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider",
-                    "org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider",
+                    "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider",
                     "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider")) {
                 if (!isActive(provider)) {
                     continue;

http://git-wip-us.apache.org/repos/asf/tomee/blob/82472058/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbPropertyVisibilityStrategy.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbPropertyVisibilityStrategy.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbPropertyVisibilityStrategy.java
new file mode 100644
index 0000000..dd7bce8
--- /dev/null
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbPropertyVisibilityStrategy.java
@@ -0,0 +1,88 @@
+/*
+ * 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.openejb.server.cxf.rs.johnzon;
+
+import org.apache.johnzon.mapper.JohnzonProperty;
+
+import javax.json.bind.annotation.JsonbProperty;
+import javax.json.bind.annotation.JsonbVisibility;
+import javax.json.bind.config.PropertyVisibilityStrategy;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+public class TomEEJsonbPropertyVisibilityStrategy implements PropertyVisibilityStrategy {
+    private final ConcurrentMap<Class<?>, PropertyVisibilityStrategy> strategies = new ConcurrentHashMap<>();
+
+    @Override
+    public boolean isVisible(final Field field) {
+        return field.getAnnotation(JsonbProperty.class) != null ||
+               field.getAnnotation(JohnzonProperty.class) != null ||
+               Modifier.isPublic(field.getModifiers()) ||
+               strategies.computeIfAbsent(field.getDeclaringClass(), this::visibilityStrategy).isVisible(field);
+    }
+
+    @Override
+    public boolean isVisible(final Method method) {
+        return method.getAnnotation(JsonbProperty.class) != null ||
+               method.getAnnotation(JohnzonProperty.class) != null ||
+               Modifier.isPublic(method.getModifiers()) ||
+               strategies.computeIfAbsent(method.getDeclaringClass(), this::visibilityStrategy).isVisible(method);
+    }
+
+    private PropertyVisibilityStrategy visibilityStrategy(final Class<?> type) { // can be cached
+        JsonbVisibility visibility = type.getAnnotation(JsonbVisibility.class);
+        if (visibility != null) {
+            try {
+                return visibility.value().newInstance();
+            } catch (final InstantiationException | IllegalAccessException e) {
+                throw new IllegalArgumentException(e);
+            }
+        }
+        Package p = type.getPackage();
+        while (p != null) {
+            visibility = p.getAnnotation(JsonbVisibility.class);
+            if (visibility != null) {
+                try {
+                    return visibility.value().newInstance();
+                } catch (final InstantiationException | IllegalAccessException e) {
+                    throw new IllegalArgumentException(e);
+                }
+            }
+            final String name = p.getName();
+            final int end = name.lastIndexOf('.');
+            if (end < 0) {
+                break;
+            }
+            p = Package.getPackage(name.substring(0, end));
+        }
+
+        return new PropertyVisibilityStrategy() {
+            @Override
+            public boolean isVisible(final Field field) {
+                return false;
+            }
+
+            @Override
+            public boolean isVisible(final Method method) {
+                return false;
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/82472058/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbProvider.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbProvider.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbProvider.java
new file mode 100644
index 0000000..19a8815
--- /dev/null
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/johnzon/TomEEJsonbProvider.java
@@ -0,0 +1,33 @@
+/*
+ * 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.openejb.server.cxf.rs.johnzon;
+
+import org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
+import javax.ws.rs.ext.Provider;
+
+@Provider
+// This will sort the Provider to be after CXF defaults. Check org.apache.cxf.jaxrs.provider.ProviderFactory.sortReaders()
+@Produces({"application/json", "application/*+json"})
+@Consumes({"application/json", "application/*+json"})
+public class TomEEJsonbProvider<T> extends JsonbJaxrsProvider<T> {
+    public TomEEJsonbProvider() {
+        config.withPropertyVisibilityStrategy(new TomEEJsonbPropertyVisibilityStrategy());
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/82472058/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
new file mode 100644
index 0000000..0c4a451
--- /dev/null
+++ b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.openejb.server.cxf.rs.johnzon;
+
+import org.apache.johnzon.mapper.JohnzonIgnore;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.SingletonBean;
+import org.apache.openejb.junit.ApplicationComposer;
+import org.apache.openejb.loader.IO;
+import org.apache.openejb.testing.EnableServices;
+import org.apache.openejb.testing.Module;
+import org.apache.openejb.testing.RandomPort;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.json.bind.annotation.JsonbTransient;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+
+@EnableServices("jax-rs")
+@RunWith(ApplicationComposer.class)
+public class JsonbJaxrsProviderTest {
+    @RandomPort("http")
+    private URL base;
+
+    @Module
+    public EjbJar beans() {
+        final EjbJar ejbJar = new EjbJar();
+        ejbJar.addEnterpriseBean(new SingletonBean(Endpoint.class));
+        return ejbJar;
+    }
+
+    @Test
+    public void run() throws IOException {
+        assertEquals("{\"value\":\"value\"}",
+                     IO.slurp(new URL(base.toExternalForm() + getClass().getSimpleName() + "/test")));
+    }
+
+    @Path("test")
+    public static class Endpoint {
+        @GET
+        @Produces(MediaType.APPLICATION_JSON)
+        public Model get() {
+            final Model model = new Model();
+            model.setValue("value");
+            model.setIgnoreJohnzon("ignoreJohnzon");
+            model.setIgnoreJsonb("ignoreJsonb");
+            return model;
+        }
+    }
+
+    public static class Model {
+        private String value;
+        @JohnzonIgnore
+        private String ignoreJohnzon;
+        @JsonbTransient
+        private String ignoreJsonb;
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setValue(final String value) {
+            this.value = value;
+        }
+
+        public String getIgnoreJohnzon() {
+            return ignoreJohnzon;
+        }
+
+        public void setIgnoreJohnzon(final String ignoreJohnzon) {
+            this.ignoreJohnzon = ignoreJohnzon;
+        }
+
+        public String getIgnoreJsonb() {
+            return ignoreJsonb;
+        }
+
+        public void setIgnoreJsonb(final String ignoreJsonb) {
+            this.ignoreJsonb = ignoreJsonb;
+        }
+    }
+}


[3/5] tomee git commit: TOMEE-2221 - Tests with @JohnzonProperty and @JsonbProperty.

Posted by jg...@apache.org.
TOMEE-2221 - Tests with @JohnzonProperty and @JsonbProperty.

(cherry picked from commit 4c7fd4a)


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

Branch: refs/heads/tomee-7.1.x
Commit: 75d0efc4e8ab2df53b7ea570b6ecba4cddc4c4da
Parents: 8247205
Author: Roberto Cortez <ra...@yahoo.com>
Authored: Mon Aug 13 15:40:38 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Tue Aug 21 12:24:25 2018 +0100

----------------------------------------------------------------------
 .../cxf/rs/johnzon/JsonbJaxrsProviderTest.java  | 50 +++++++++++++++-----
 1 file changed, 37 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/75d0efc4/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
index 0c4a451..98b6b8e 100644
--- a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
+++ b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
@@ -17,6 +17,7 @@
 package org.apache.openejb.server.cxf.rs.johnzon;
 
 import org.apache.johnzon.mapper.JohnzonIgnore;
+import org.apache.johnzon.mapper.JohnzonProperty;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.SingletonBean;
 import org.apache.openejb.junit.ApplicationComposer;
@@ -27,6 +28,7 @@ import org.apache.openejb.testing.RandomPort;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import javax.json.bind.annotation.JsonbProperty;
 import javax.json.bind.annotation.JsonbTransient;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
@@ -52,7 +54,7 @@ public class JsonbJaxrsProviderTest {
 
     @Test
     public void run() throws IOException {
-        assertEquals("{\"value\":\"value\"}",
+        assertEquals("{\"johnzon\":\"johnzon\",\"jsonb\":\"jsonb\",\"value\":\"value\"}",
                      IO.slurp(new URL(base.toExternalForm() + getClass().getSimpleName() + "/test")));
     }
 
@@ -63,8 +65,10 @@ public class JsonbJaxrsProviderTest {
         public Model get() {
             final Model model = new Model();
             model.setValue("value");
-            model.setIgnoreJohnzon("ignoreJohnzon");
-            model.setIgnoreJsonb("ignoreJsonb");
+            model.setJohnzonIgnore("ignoreJohnzon");
+            model.setJsonbIgnore("ignoreJsonb");
+            model.setJohnzonProperty("johnzon");
+            model.setJsonbProperty("jsonb");
             return model;
         }
     }
@@ -72,9 +76,13 @@ public class JsonbJaxrsProviderTest {
     public static class Model {
         private String value;
         @JohnzonIgnore
-        private String ignoreJohnzon;
+        private String johnzonIgnore;
         @JsonbTransient
-        private String ignoreJsonb;
+        private String jsonbIgnore;
+        @JohnzonProperty("johnzon")
+        private String johnzonProperty;
+        @JsonbProperty("jsonb")
+        private String jsonbProperty;
 
         public String getValue() {
             return value;
@@ -84,20 +92,36 @@ public class JsonbJaxrsProviderTest {
             this.value = value;
         }
 
-        public String getIgnoreJohnzon() {
-            return ignoreJohnzon;
+        public String getJohnzonIgnore() {
+            return johnzonIgnore;
         }
 
-        public void setIgnoreJohnzon(final String ignoreJohnzon) {
-            this.ignoreJohnzon = ignoreJohnzon;
+        public void setJohnzonIgnore(final String johnzonIgnore) {
+            this.johnzonIgnore = johnzonIgnore;
         }
 
-        public String getIgnoreJsonb() {
-            return ignoreJsonb;
+        public String getJsonbIgnore() {
+            return jsonbIgnore;
         }
 
-        public void setIgnoreJsonb(final String ignoreJsonb) {
-            this.ignoreJsonb = ignoreJsonb;
+        public void setJsonbIgnore(final String jsonbIgnore) {
+            this.jsonbIgnore = jsonbIgnore;
+        }
+
+        public String getJohnzonProperty() {
+            return johnzonProperty;
+        }
+
+        public void setJohnzonProperty(final String johnzonProperty) {
+            this.johnzonProperty = johnzonProperty;
+        }
+
+        public String getJsonbProperty() {
+            return jsonbProperty;
+        }
+
+        public void setJsonbProperty(final String jsonbProperty) {
+            this.jsonbProperty = jsonbProperty;
         }
     }
 }