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

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

问题描述

我创建了一个Class Mediator,在其中我想与两个策略相交.我已经用Carbon Studio for Eclipse创建了Class Mediator,它会自动向项目的构建路径中添加一些预定义的库.

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

如果我要使用相交方法,则会出现异常.如果看一下源代码,我会发现相交方法只会引发"UnsupportedOperationException".

因此给定的neethi库对于交集无效,因此我想在类调解器内部使用最新的Neethi库(aka neethi-3.0.2.lib)进行交集.

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

谢谢

解决方案

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

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

运行时库由WSO2 Carbon Server运行时提供.由于服务器中neethi的版本不支持,因此服务器抛出此UnsupportedOperationException异常.因此,您需要在服务器运行时中升级库.

但是,您可以看到,WSO2分叉了neethi代码库,并在分叉的源代码上提供了一些自定义实现.因此,IMO,仅升级版本将无济于事.

无论如何,您实际上都需要升级该库,并查看它是否遇到任何问题.

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

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

因此,IMO的底线是,版本升级将面临一些问题.但是,是的,您当然可以尝试一下,看看我们是否能克服它们.尝试一下,然后在这里发表您的意见.我们将尽力为您提供帮助.

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.

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

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".

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.

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).

Thanks

解决方案

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

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.

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.

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.

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.

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.

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天全站免登陆