-
October 12th, 2018, 02:46 AM
#1
param in adapter xml
Hi,
Is there a way to share the param value across multiple data providers. Can we use the shared property in metadata_provider section or suggest any better option.
Example:
<data_provider name="ADAPTER_ONE">
<param name="userName">myusername</param>
<param name="password">mypassword</param>
</data_provider>
<data_provider name="ADAPTER_TWO">
<param name="userName">myusername</param>
<param name="password">mypassword</param>
</data_provider>
<data_provider name="ADAPTER_THREE">
<param name="userName">myusername</param>
<param name="password">mypassword</param>
</data_provider>
-
October 15th, 2018, 11:53 AM
#2
Hi,
Defining the shared properties once for the Metadata Adapter is a possibility.
However, this requires that the Data Adapters can get a pointer to the related Metadata Adapter.
This is not directly provided, but you can easily achieve this, by considering the following hints (note: this assumes in--process java adapters; for remote adapters there may be some complications):
- The Metadata Adapter for an Adapter Set has a unique identifier which it receives as the "adapters_conf.id" parameter in the params Map upon init(). All Data Adapters in the same Adapter Set receive the same parameter. Hence the Metadata Adapter can register itself in a static Map by using this identifier.
- You should set <metadata_adapter_initialised_first> as Y in adapters.xml. This ensures that init() is invoked on the various Data Adapters only after the invocation of init() on the Metadata Adapter has terminated.
- The <classloader> setting for all Adapters should be left as "common".
Our demos show examples of communications between the Adapters, although in slightly different contexts. Se the Chat Demo for instance:
Another possibility, available since Server version 6.1, is to refer to JVM properties.
In this case you will not save the <param> elements, but there you can just refer to common JVM properties and then you can specify the common values elsewhere once.
See <enable_expansion_for_adapters_config> in the Server's main configuration file.
Similar Threads
-
By chewjq in forum Adapter SDKs
Replies: 1
Last Post: May 20th, 2010, 10:17 AM
-
By Irwin in forum Adapter SDKs
Replies: 11
Last Post: April 30th, 2010, 09:42 AM
-
By quantri_vn87 in forum Adapter SDKs
Replies: 3
Last Post: October 29th, 2009, 03:16 PM
-
By amarin in forum Adapter SDKs
Replies: 4
Last Post: August 21st, 2008, 10:23 AM
-
By quanhm in forum General
Replies: 2
Last Post: December 13th, 2007, 02:48 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 06:43 PM.
Bookmarks