没有隔离共享库的JAX-RS 2.0 WebSphere 8.5 [英] JAX-RS 2.0 WebSphere 8.5 without isolated shared library

查看:142
本文介绍了没有隔离共享库的JAX-RS 2.0 WebSphere 8.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jersey 2在IBM WebSphere 8.5环境中实现JAR-RS 2.0。

I am using Jersey 2 to implement JAR-RS 2.0 in an IBM WebSphere 8.5 environment.

阅读此帖后 Websphere 8中的JAX-RS Jersey 2.10支持我设法让这个工作。

After reading this post JAX-RS Jersey 2.10 support in Websphere 8 I managed to get this working.

但是,是否可以捆绑JAX- WAR中的RS Jars并部署应用程序而无需创建隔离的共享库?如果这是不可能的,有人可以解释为什么会这样吗?

However, is it possible to bundle the JAX-RS Jars within the WAR and deploy the application without the need to create an isolated shared library? If this is not possible, can someone please explain why this is the case?

我理解在库中使用Jars的部署时间优势,但我更愿意将整个应用程序(包括依赖项)构建到单个WAR中。

I understand the deployment time advantage of having the Jars in a library, but I would prefer to build the entire application including dependencies into a single WAR.

- 编辑 -

看来您可以加载JAX如果您更改类加载顺序,-RS从WAR内部开始。您需要更改顺序以最后加载父类。这可以按如下方式完成;

It appears that you can load the JAX-RS jars from within the WAR if you change the class loading order. You need to change the order to load classes parent last. This can be done as follows;

在管理控制台中:

应用程序 - > WebSphere企业应用程序 - > {your.application} - >管理模块 - > {your.module}

Applications -> WebSphere enterprise applications -> {your.application} -> Manage Modules -> {your.module}

将类加载器顺序下拉列表更改为:首先加载本地类加载器的类(父类最后一个) )。

Change the Class loader order dropdown to: "Classes loaded with local class loader first (parent last)".

然而,这表明附加的Stackoverflow文章中缺少一些JVM属性。

This however suggests that some JVM properties are missing from the attached Stackoverflow article.

任何人都可以对这种情况有所了解?

Can anyone shed some light on the situation?

推荐答案

如果你改变了,你可以从WAR中加载JAX-RS罐子类加载顺序。您需要更改顺序以最后加载父类。这可以按如下方式完成;

It appears that you can load the JAX-RS jars from within the WAR if you change the class loading order. You need to change the order to load classes parent last. This can be done as follows;

在管理控制台中:

应用程序 - > WebSphere企业应用程序 - > {your.application} - >管理模块 - > {your.module}

Applications -> WebSphere enterprise applications -> {your.application} -> Manage Modules -> {your.module}

将类加载器顺序下拉列表更改为:首先加载本地类加载器的类(父类最后一个) )。

Change the Class loader order dropdown to: "Classes loaded with local class loader first (parent last)".

这篇关于没有隔离共享库的JAX-RS 2.0 WebSphere 8.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆