如何在 Weblogic 中创建通用组件? [英] How do I create a common component in Weblogic?

查看:24
本文介绍了如何在 Weblogic 中创建通用组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想构建一个可以从任何部署的应用程序调用的通用组件.但我不知道如何做到这一点?有这种模式吗?

I want to build a common component that can be called from any deployed application. But I do not know how to do this? Is there a pattern for this?

例如

如果我部署 webservice #1,我希望它调用也部署在服务器上的通用应用程序.然后我添加了一个新的 webservice #2,我也想让这个调用通用应用程序.

If I deploy webservice #1, I want it to call a common application that is also deployed on the server. Then I add a new webservice #2, I also want this one to call the common application.

我该怎么做?有任何想法吗?谢谢

How can I do this? Any Ideas? Thanks

推荐答案

如上所述,您可以将共享组件部署为库.在这种情况下,其他应用程序需要在 weblogic.xml 中声明对这个库的依赖.您可以在以下位置找到详细信息:http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/libraries.htm#WLPRG325

You may deploy your shared component as a librarie as mentioned. In this case the other application would need to declare a dependence on this libraries in weblogic.xml . You can find detailed information on this at: http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/libraries.htm#WLPRG325

要使用共享库,您需要了解类加载,因此本文档将帮助您了解 weblogic 类加载以及在使用 weblogic 时如何共享库:http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/classloading.htm#i1080994一个>

To use shared libraries you will need to understand classloading so this document will help you understand weblogic classloading and how you can share libraries when using weblogic: http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/classloading.htm#i1080994

另一种选择是使用服务方法,您可以使用 EJB 或 Web 服务来做到这一点.EJB 更适合在公司内部共享服务,而 Web 服务最适合互联网.

Another option is using a Service approach, you can do this using EJBs or WebServices. EJBs are better for sharing services inside your corporation while WebServices are best suited for internet.

这篇关于如何在 Weblogic 中创建通用组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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