Hi I'm Sanjay Nagchowdhury, Development Lead
for the App Connect Enterprise team.
In this video I will demonstrate how to use
policies in App Connect Enterprise
Version 11. I will be accessing data from
a DB2
database on Windows from a message flow running
in App Connect Enterprise on a
Mac. I will use a JDBC provider policy to
define the connection details to the
database. I will also show how values in the
policy can be overridden.
In App Connect Enterprise Version 11 a new
first-class artifact called 'Policy
Project' has been added. You can create multiple
policies within a Policy Project.
In this video I'm creating a JDBC Provider
policy to access a DB2 database.
I will specify the connection details in the
policy.
I have copied the required DB2 jar files to
my Mac
and I need to specify the directory that contains
them.
I will specify a security identifier that can be
used to look up the userid and
password to connect to the database. Policies
can be referenced from message
flow nodes. I'm going to reference the JDBC
Provider policy from a Java Compute node.
I have a simple flow that processes a HTTP
request and accesses the database
using a Java Compute Node. The Java Compute
Node references the policy when
setting up the JDBC connection. I have explicitly
specified the Policy Project
and Policy Name. I need to connect to the
database using a userid and password. I
will store these details using mqsisetdbparms.
Mqsisetdbparms uses the same work directory
that is used by the Integration Server.
The security identifier that I specified in
the policy matches the security
identifier that is used with mqsisetdbparms.
I'll start a new Integration Server and connect
to it from the toolkit.
I'll create a new BAR file.
I'll add the application containing the message flow to the BAR file. I'll
also add the Policy Project to the BAR file.
I have already started an Integration Server.
I can deploy the BAR file directly to the Integration Server.
I'll send a test message using the Flow Exerciser.
The flow failed to connect to the database.
The policy was using connection details for
a machine used by the Application
Developer. As an Administrator I need to override
the policy values to use a
different machine that is hosting the database.
I can do this by copying the
Policy to the overrides directory and then
change the hostname that is in the
policy. You can also export the Policy Project
from the toolkit or your
version control system. The policy in the
overrides directory
will now be used by the message flow. The
Integration Server must be restarted for
overrides to take effect.
I can now resend the message.
I now see the flow connected successfully
to the database and
returned data from it.
In this video I have shown how to create a policy and
reference it.
I have also shown how to override a value
in it.
Policy projects can be added to a BAR file
and deployed directly to an
Integration Server. This simplifies configuring
your Integration Solution.
