Two part question. Generic question about a server configuration feature, and then it\'s possible implications for what we\'d like to do.
The worklight properties fi
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.
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.
Some of the properties "overlap" and must match (host, port, context root, ...) for proper behavior.
As for your scenario - I think it is workable.
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.
Keeping the above in mind:
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.
Notes:
Notes 2:
In Worklight 6.0 the mentioned overlap in server connectivity properties between worklight.properties and application-descriptor.xml is no more.
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.