worklight服务器配置-分离适配器和服务器 [英] worklight server configuration - separating adapters and server

查看:100
本文介绍了worklight服务器配置-分离适配器和服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两部分的问题.有关服务器配置功能的通用问题,然后可能对我们想做的事情产生影响.

Two part question. Generic question about a server configuration feature, and then it's possible implications for what we'd like to do.

Worklight属性文件具有条目publicWorklightHostname,publicWorklightPort,publicWorklightProtocol.各个应用程序还在应用程序描述符中指定了几乎相同的信息.显然,应用程序需要描述符信息来查找"服务器.相应的条目在worklight.properties中起什么作用?我相信这两个应该匹配.

The worklight properties file has entries publicWorklightHostname, publicWorklightPort, publicWorklightProtocol. Individual applications also specify much the same information in the application descriptor. It's clear that applications need the descriptor information to "find" the server. What purpose do the corresponding entries serve in worklight.properties? I believe that the two are supposed to match.

我们有一个场景,我们需要将适配器部署到特定的计算机上,因为只有它可以连接到我们的后端.理想情况下,我们希望每个开发人员都开发使用这些适配器的应用程序.每个开发人员都将其应用程序部署到自己的WL Server.我希望通过调整应用程序描述符,应用程序可以将共享适配器服务器用于其服务器调用.这些似乎不起作用,Worklight似乎反对以这种方式使用其适配器-从安全角度来看,这是有道理的.我们的方法可以奏效吗?

We have a scenario where we need to deploy our adapters to a particular machine as only it has connectivity to our backends. Ideally we would like each developer to develop applications that use those adapters. Each developer would deploy their applications to the own WL Server. I was hoping that by adjusting the application descriptor the applications would use the shared adapter server for their server calls. These seems not work, Worklight seemingly objecting to its adapters being used in this way - which makes sense from a security perspective. Can our approach be made to work?

推荐答案

  • worklight.properties中找到的属性与 Worklight服务器.您所提到的属性publicWorklightHostnamepublicWorklightPortpublicWorklightProtocol是必需的,因为服务器本身需要知道指向外部世界的URL,以便可以将其嵌入重定向等.这些对于移动Web,桌面浏览器环境和Worklight控制台也是必需的.

    • The properties that are found in worklight.properties relate to the Worklight Server. The properties you have mentioned: publicWorklightHostname, publicWorklightPort, publicWorklightProtocol, are required because the server itself needs to know what is its URL to the outside world, so that it can embed it in redirects and such. These are also required for the Mobile Web, Desktop Browser environments and Worklight Console.

      application-descriptor.xml中找到的属性与Worklight应用程序相关(大多数不是全部).如前所述,应用程序可以知道要连接到哪个Worklight Server.

      The properties that are found in application-descriptor.xml relate (mostly, not all) to the Worklight application. As you'ved mentioned, for the application to know to which Worklight Server to connect to.

      某些属性"overlap",并且必须匹配(主机,端口,上下文根等)以确保正常行为.

      Some of the properties "overlap" and must match (host, port, context root, ...) for proper behavior.


      至于您的情况-我认为这是可行的.


      As for your scenario - I think it is workable.

      要使其正常工作,将部署到容纳适配器的Worklight Server的.war文件必须包含一个能够满足各个项目的应用程序需求的authenticationConfig.xml文件-即,包含所有应用程序所需的所有领域,等等.

      For this to work, the .war file you will deploy to the Worklight Server housing the adapters will have to contain an authenticationConfig.xml file that is able to cater for the needs of the various projects' applications - that is, contain all required realms, etc for all apps.

      请牢记以上几点:

      1. 配置application-descriptor.xml以指向容纳适配器的Worklight Server.
      2. 连接到该Worklight Server的Worklight控制台,并部署应用程序生成的.wlapp文件.为了使Worklight Server能够识别应用程序,这是必须的.

      应用程序现在应该能够连接到服务器并使用适配器.
      还假定这些适配器也是属于应用程序的同一项目的一部分.

      The applications should now be able to connect to the server and use the adapters.
      It is also assumed that these adapters, too, are part of the same project housing the applications.

      注释:

      1. 开发人员进行的每个本地构建之后,他/他将需要将.wlapp重新部署到远程服务器,因为应用程序chceksum已更改,并且没有重新部署,因此您总是会遇到直接更新的问题.要求.
      2. (1)的替代方法是禁用直接更新.
      3. 如果您具有Java代码(例如,用于自定义身份验证的Java代码)并进行了更改,则还需要将.war文件重新部署到远程服务器上.


      注释2:

      • 在Worklight 6.0中,上面提到的worklight.properties和application-descriptor.xml之间的服务器连接属性不再重叠.

      • In Worklight 6.0 the mentioned overlap in server connectivity properties between worklight.properties and application-descriptor.xml is no more.

      在Worklight 6.0中,您现在可以在同一服务器实例中同时运行多个Worklight项目(或.war文件),因此,尽管适配器仍然是按项目的实体,但您可以在单独的项目中复制它们在运行Worklight Server的同一台服务器上,并且有多个单独的项目(应用程序)使用该服务器连接到后端.

      In Worklight 6.0 you are now able to concurrently run multiple Worklight projects (or, .war files) in the same server instance, so while adapters are still per-project entities, you can have them duplicated in separated projects on the same server machine running Worklight Server and have multiple separate projects (applications) use that server to connect to the backend.

      这篇关于worklight服务器配置-分离适配器和服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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