APISonar


fish.payara.ejb.http.protocol.SerializationType.JSON

> fish > payara > ejb > http > protocol > SerializationType > JSON
fish APIs payara APIs ejb APIs http APIs protocol APIs SerializationType APIs JSON APIs

Example 1
public void annotatedSerializerTopLevelReturnNull() {
        Container result = remoteService.polymorphicReturn(true);
        if (getSerializationType() == SerializationType.JSON) {
            assertThat(result.get()).isNull();
        } else {
            assertNull(result);
        }
    }
Example 2
public void remoteBeanMethodCall_ErrorResultNotSerializable() throws NamingException {
        RemoteBean bean = (RemoteBean) context.lookup("java:global/myapp/RemoteBean");
        try {
            CustomNonSerializableType result = bean.failJavaReturnType();
            assertEquals(SerializationType.JSON, serializationType);
            assertNotNull(result);
            assertEquals("Only works in JSONB", result.value);
        } catch (UndeclaredThrowableException ex) {
            assertEquals(SerializationType.JAVA, serializationType);
            assertSame(NotSerializableException.class, ex.getUndeclaredThrowable().getClass());
            assertEquals("fish.payara.ejb.http.client.RemoteEJBContextTest$CustomNonSerializableType", ex.getUndeclaredThrowable().getMessage());
        }
    }