Activation Spec specifies the database connection properties for an Inbound JDBC adapter, in the same way as the Outbound JDBC adapter uses the managed connection factory.
“Managed connection factory properties are used by the adapter at run time to create an outbound connection instance with the database. Similarly it uses the Activation spec for configuring any Inbound database operation viz. event polling.”
Problem Statement:-
In the present scenario we want to connect to at least 4 databases at the same time and poll for events using the Inbound JCA-JDBC Adapter using Multiple Activation Specs.
Solution:-
The above scenario can be realized using WPS, by creating as many exports for an inbound JDBC adapter (by running the external service wizard that many times) as many database connections are required. Every export is associated with a specific activation spec and hence for 4 exports, 4 activation specs get created, in turn fulfilling the requirement for Multiple Activation Specs. These specs get created when we are configuring the inbound adapters.
WHAT TO DO & HOW TO DO?
Our sole objective is to create multiple Inbound JDBC Adapters in a module such that they use mutually exclusive Activation Specs to connect to respective databases. Activation Specs as I mentioned earlier also is a collection of connection specific properties used by the Inbound adapters to connect to the database. Create a fresh module and run the external service wizard for 4 times (say for instance we want to connect to 4 different databases). Every time we run the wizard, we need to specify the connection properties, these properties are nothing but activation spec properties.
In figure 1 below, I have created 4 exports for an Inbound JDBC adapter and have connected them to a Java component based on a fictitious requirement. We can do what ever we want to with the events delivered by the Inbound adapters.
FIGURE 1
The JDBC inbound adapter allows us to modify the activation spec properties even after the adapter has been created by clicking on the corresponding SCA component and checking its properties. Refer to the next figure for the same.
The connection properties that we specify are actually the activation spec properties and are visible in the export’s properties tab:-
FIGURE 2
The connection properties that we specify are actually the activation spec properties and are visible in the export’s properties tab:-
FIGURE 2
Some of the other Activation Spec properties are:-
FIGURE 3
FIGURE 3

Conclusion:-
Multiple activation specs can be created for inbound JDBC adapters by creating as many exports as the number of databases we want to connect to. This would internally create specific Activation specs for every associated export.



