开发者

How do I create a common component in 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?

For example,

If I deploy webservice #1, I want it to call a common app开发者_开发百科lication 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


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

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

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.


Way 1: deploy the common component as a library. This is a vendor-specific way, but it works.

Way 2: drop common component into a classpath of the managed server(s).

Way 3: call common component via remote call, i.e. WS/SOAP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜