zoukankan      html  css  js  c++  java
  • OpenXDS配置文件详解

          进来使用两台机子部署OpenXDS的文档共享域。两台机子的职能是这样分配的,远程服务器10.0.0.254承担注册中心和文档存储池的任务,我的开发机

    localhost承担文档存储池的任务。我准备用这样的环境,测试OpenXDS的分布式存储集中查询的功能。

          OpenXDS的配置文件主要分两部分,服务器端和客户端。服务器端是OpenXDS框架提供的,客户端的配置,是我根据其单元测试改造的。

          下面是首先说服务器端的。服务器端的配置文件在OPENXDS_HOME/conf/actors目录下。其主配置文件为IheActors.xml。在IheActors.xml文件中,

    通过IncludeFile的方式包含了其他的配置文件AuditRepositoryConnections.xml,XcaInitiatingGatewayConnections.xml,

    XcaRespondingGatewayConnections.xml,XdsRegistryConnections.xml,XdsRepositoryConnections.xml。从名字上可以看出这几个文件分别配

    置了OpenXDS几个Actors的链接问题。至于配置文件中每个标签的具体含义这里不在赘述,https://www.projects.openhealthtools.org/sf/go/page1121

    官方论坛上有比较详细的叙述,而且也不难理解。我着重说明如何去具体配置以实现环境的部署。

          回到上面的例子中,首先配置localhost,localhost的作用是实现文档存储池。这样,在IheActors.xml中,可以把和Registry角色相关的注释掉。比如

    <Actor name="xdsreg" type="XdsRegistry">和<Actor name="xdsreg_secure" type="XdsRegistry">。主要配置Repository即可。在Repository

    部分,可以看到如下配置:

    XdsRepository
    <Actor name="xdsrep" type="XdsRepository">
            <Description>XDS Repository</Description>
            <Connection type="Server" name="xds-repository"/>
            <Connection type="Registry" name="xds-registry-client"/>
        </Actor>

    这段配置文件表明,Repository角色,承担了两个工作,存储的服务端和注册功能的客户端,对应了Web Service中的ProvideAndRegistry。关于这两个功能

    的链接配置,在XdsRepositoryConnections.xml中。我们再去XdsRepositoryConnections.xml文件中看到如下配置:

    RepositoryConnection
     1 <StandardConnection name="xds-repository">
     2         <!--The host name of the XDS Repository Server-->
     3         <HostName>localhost</HostName>
     4         <!--The port-->
     5         <Port>8020</Port>
     6        
     7         <Includefile name="XdsCodes.xml" />        
     8 </StandardConnection>
     9 <StandardConnection name="xds-registry-client">
    10         <!--The host name of the XDS Registry Server-->
    11         <HostName>localhost</HostName>
    12         <!--The port-->
    13         <Port>8010</Port>
    14         <!--The URL of the XDS Registry web services -->
    15         <UrlPath>/axis2/services/xdsregistryb</UrlPath>        
    16 </StandardConnection>

    看到这里关于这部分的配置就相当明了了。我们要把注册配置到远程,需要修改registry-client的主机到10.0.0.254即可。需要注意的事,在一开始的配置中,

    我就在这里出现了问题,我禁用了本地的Registry服务,在XdsRegistryConnections.xml中把注册都修改到10.0.0.254。最终在调试的时候,

    ProvideAndRegistry依然总是调用localhost的注册服务,然后失败。换言之,OpenXDS并没有调用远程的注册服务。经过研究,问题就出在这里。因为我

    注释掉了localhost注册相关角色,再去改XdsRegistryConnections.xml没有任何意义。而ProvideAndRegistry服务中,其实是使用的Repository角色

    的registry-client功能,因此要修改的是XdsRepositoryConnections.xml中的相关链接信息。

         在10.0.0.254这台主机上,没有特别的,启动了所有的服务。也没有遇到任何问题。

         这只是个配置的小例子,但是通过这个小例子,我们对OpenXDS的配置和部署有了更深入的认识。以后也可以进行更为复杂的配置。

  • 相关阅读:
    Lucky Substrings
    KMP
    圆桌问题(hdu4841)
    codeforces 624C Graph and String
    Joseph(hdu1443)
    The Longest Straight(FZUoj2216)
    C1. 组队活动 Small(BNUOJ)
    A1. 道路修建 Small(BNUOJ)
    Problem 2221 RunningMan(fuzoj)
    CODEFORCEs 621E. Wet Shark and Blocks
  • 原文地址:https://www.cnblogs.com/ITEagle/p/2453287.html
Copyright © 2011-2022 走看看