jax-rs sse client with Singleton in Glassfish/Payara

倖福魔咒の 提交于 2019-12-11 03:04:43

问题


About jax-rs client with SSE in EJB Singleton, I've tried with Payara server full-5.183 (without docker) for this example, [https://abhirockzz.wordpress.com/2017/07/27/jax-rs-2-1-sse-client-api-example-using-glassfish-5-on-docker/], but failed. Error shown at line eventSource = SseEventSource.target(target).build();

 @PostConstruct
public void init() {
    this.sseClient = ClientBuilder.newClient();
    this.target = this.sseClient.target("https://sse.now.sh");

    tsvc.createSingleActionTimer(15000, null);
    System.out.println("SSE client timer created");

    eventSource = SseEventSource.target(target).build();
    System.out.println("SSE Event source created........");
}

Error message: "java.lang.IllegalArgumentException: Argument fish.payara.requesttracing.jaxrs.client.decorators.JaxrsWebTargetDecorator@23112ded is not a valid JerseyWebTarget instance. SseEventSource does not support other WebTarget implementations."

Can anyone give me an idea?

来源:https://stackoverflow.com/questions/53237730/jax-rs-sse-client-with-singleton-in-glassfish-payara

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!