在 WSO2ESB 类调解器中进行策略交集 [英] Do Policy Intersection in WSO2ESB Class Mediator

查看:15
本文介绍了在 WSO2ESB 类调解器中进行策略交集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个类调解器,我想在其中交叉两个策略.我已经使用 Carbon Studio for Eclipse 创建了 Class Mediator,它会自动将一些预定义的库添加到我的项目的构建路径中.

I've created a Class Mediator in which I want to intersect two policies. I've created the Class Mediator with Carbon Studio for Eclipse, which automatically adds some predefined libs to the build path of my project.

其中一个库是 neethi-2.0.4.wso2v1.jar.

One of the libs is neethi-2.0.4.wso2v1.jar.

如果我想使用 intersect-method 我得到一个异常.如果我查看源代码,我会发现 intersect-method 只会抛出UnsupportedOperationException".

If I want to use the intersect-method I get an exception. If I have a look at the source I see that the intersect-method just throws an "UnsupportedOperationException".

因此,给定的 neethi 库对交集毫无用处,因此我想在我的类调解器中使用最新的 Neethi 库(又名 neethi-3.0.2.lib)进行交集.

So the given neethi lib is useless for intersection, therefore I want to use the newest Neethi lib (aka neethi-3.0.2.lib) for intersection inside my class mediator.

你能告诉我如何包含第三方库,尤其是在我的用例中,这些库应该覆盖曾经在 esb 中使用过的库(neethi-2.0.4.wso2v1.jar).

Could you tell me how I can include third party libs, especially in my use case these ones, that should override the once used inside the esb( neethi-2.0.4.wso2v1.jar).

谢谢

推荐答案

Developer Studio 将这些库添加到您的项目类路径中,这样开发人员就不会在源代码中遇到构建错误.

Developer Studio adds these libs to your project classpath, so that developers do not get build errors in the source code.

因此,这些库仅适用于开发时间,并且仅适用于 Dev Studio.它们不是服务器运行时使用的库.

Therefore those libraries are only for the development time and available only with Dev Studio. They are not the libraries used in the runtime of the server.

运行时库由 WSO2 Carbon Server 运行时提供.所以服务器抛出这个 UnsupportedOperationException 是由于服务器中的 neethi 版本不支持它而发生的.所以你需要在服务器运行时升级库.

Runtime libraries are provided by the WSO2 Carbon Server runtime. So this UnsupportedOperationException is thrown by the server is occurred due to the version of the neethi in the server does not support it. So you need to upgrade the library in the server runtime.

但正如您所见,WSO2 已经对 neethi 代码库进行了分叉,并在分叉的源代码上进行了一些自定义实现.因此,IMO,仅升级版本无济于事.

But as you can see, WSO2 have forked the neethi codebase and have some custom implementations on the forked source. So IMO, simply upgrading the version would not help.

无论如何,您需要实际升级库,看看您是否遇到任何问题.

Anyway you need to actually upgrade the library and see whether you face any issues with it.

要升级版本,您可以为较新的 Neethi 库创建 Java 库工件并将其包含在 CAR 文件中并部署 CAR 文件或将新的 Neethi 库复制到 <CARBON_HOME>/repository/components/lib 服务器运行时的位置.

To upgrade the versions, you can either create a Java Library artifact for newer Neethi library and include it in the CAR file and deploy the CAR file or copy the new Neethi library to <CARBON_HOME>/repository/components/lib location while the server is running.

您可以在 <CARBON_HOME>/repository/components/plugins 位置找到当前的 Neethi 库.如果您发现一些类似于链接错误"的错误或异常,请尝试删除旧版本的库.但它会导致一些其他异常.

You can find the current Neethi library in the <CARBON_HOME>/repository/components/plugins location. If you find some error or exception similar to "Linkage Error", then try to remove the older version of the library. But it would cause some other exceptions.

所以 IMO 的底线是,您将面临版本升级的一些问题.但是是的,当然你可以试一试,看看我们是否能克服它们.试一试,并在此处发布您的观察结果.我们会尽力为您提供帮助.

So IMO the bottom line is, you will face some issues with the version upgrade. But yes of course you can give a try and see, whether we can overcome them. Give it a try and post your observations here. We will try our best to assist you.

这篇关于在 WSO2ESB 类调解器中进行策略交集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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