Oracle神諭

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評(píng)論 :: 0 Trackbacks

          Considerations when choosing a technology (當(dāng)選擇一個(gè)技術(shù)時(shí)候的考慮)
          Each and every technology presented here has its drawbacks. You should carefully consider you needs, the services your exposing and the objects you'll be sending over the wire when choosing a technology.
          每個(gè)技術(shù)這里介紹的都有它的缺點(diǎn)。你應(yīng)該仔細(xì)考慮你的需要,當(dāng)你選擇的時(shí)考慮你的暴露的服務(wù)和你將要發(fā)送關(guān)系的對(duì)象。


          When using RMI, it's not possible to access the objects through the HTTP protocol, unless you're tunneling the RMI traffic. RMI is a fairly heavy-weight protocol in that it support full-object serialization which is important when using a complex data model that needs serialization over the wire. However, RMI-JRMP is tied to Java clients: It is a Java-to-Java remoting solution.
          當(dāng)我們使用RMI,我們不可以通過http協(xié)議訪問對(duì)象,除非你打通RMI交通的隧道。RMI 是一個(gè)非常重量級(jí)協(xié)議,在其中他支持的所有對(duì)象的序列化是非常重要的,當(dāng)使用一個(gè)需要序列化關(guān)聯(lián)的復(fù)雜的數(shù)據(jù)模型。然而,RMI-JRMP 是依賴java客戶端的:它是java-to-java的遠(yuǎn)程解決方案。


          Spring's HTTP invoker is a good choice if you need HTTP-based remoting but also rely on Java serialization. It shares the basic infrastructure with RMI invokers, just using HTTP as transport. Note that HTTP invokers are not only limited to Java-to-Java remoting but also to Spring on both the client and server side. (The latter also applies to Spring's RMI invoker for non-RMI interfaces.)
          Spring 的HTTP invoker 是一個(gè)不錯(cuò)的選擇,如果你需要基于HTTP的遠(yuǎn)程,而且需要java序列化回復(fù)。它使用RMI invoker分享了基礎(chǔ)結(jié)構(gòu),僅僅使用HTTP作為傳輸。注意HTTP invoker不是僅僅限制給java-to-java的遠(yuǎn)程而且是在客戶端和服務(wù)器端的Spring.(后面的也應(yīng)用到Spring 的RMI invoker為非RMI的接口)。

          Hessian and/or Burlap might provide significant value when operating in a heterogeneous environment, because they explicitly allow for non-Java clients. However, non-Java support is still limited. Known problems include the serialization of Hibernate objects in combination with lazily initializing collections. If you have such a data model, consider using RMI or HTTP invokers instead of Hessian.
          Hessian 和或 Burlap可以支持重要的值,當(dāng)在一個(gè)異質(zhì)的環(huán)境操作,因?yàn)樗麄兠鞔_的允許為非java 對(duì)象。然而非java對(duì)象是受限制的,知道的問題包括hibernate對(duì)象序列化與懶漢初始化集合的結(jié)合上。如果你有這樣的數(shù)據(jù)模型,考慮使用RMI或HTTP invokers而不是Hessioan.

          JMS can be useful for providing clusters of services and allowing the JMS broker to take care of load balancing, discovery and auto-failover. By default Java serialization is used when using JMS remoting but the JMS provider could use a different mechanism for the wire formatting, such as XStream to allow servers to be implemented in other technologies.


          Last but not least, EJB has an advantage over RMI in that it supports standard role-based authentication and authorization and remote transaction propagation. It is possible to get RMI invokers or HTTP invokers to support security context propagation as well, although this is not provided by core Spring: There are just appropriate hooks for plugging in third-party or custom solutions here.

           

          posted on 2005-06-24 10:15 java世界暢談 閱讀(663) 評(píng)論(0)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 靖江市| 上林县| 咸丰县| 安庆市| 临泉县| 宁德市| 蒙城县| 桦川县| 托克托县| 庄浪县| 顺平县| 泾阳县| 大洼县| 类乌齐县| 新蔡县| 石林| 扶沟县| 铜川市| 龙海市| 普宁市| 塔城市| 灵石县| 吉首市| 巴楚县| 廊坊市| 鄂尔多斯市| 盐山县| 安泽县| 沛县| 化德县| 屯留县| 和顺县| 板桥市| 定西市| 简阳市| 十堰市| 怀宁县| 南投市| 浮梁县| 巩留县| 济宁市|