BAM Data Control Error

So here I was trying to deploy an ADF application quickly to see how BAM data controls work. I created a BAM connection in JDeveloper Resource palette. Right click a data object and select “Create Data Control”. Nice. I drop the data control on a new jsp, go through the wizard to create a bar chart. Compile, Deploy and I am off to the browser to see the result. I am greeted by a very informative exception:

Failed handling event FirstGetOnDataProvider on QueryConfigured

A quick search on the oracle forums does not yield much except that this appears to be a common stumbling block. Next step: Fusion Developers Guide.
So I learn, BAM Data Controls are special. Each instance uses BAM Server resources they connect to. Oracle recommends:
1. Always use BAM data controls within bounded task flows
2. Set Data Control Scope set to isolated.
3. Set the session time out in web.xml to a reasonable value.
Note that the data control scope is set by default to isolated in a newly created bounded task flow.

Deploying an ADF app using BAM data controls is also special. There is one extra step you need to take after deploying your application.
1. Application must be configured for MDS. (Ah…my earlier post helps here. )
2. A new BAM connection has to be created for your data control in EM.

As you saw in my earlier post, many kinds of ADF connections can be created and maintained in EM. In this case, the BAM connection that you setup in Jdeveloper does not show up once the application is deployed. This behavior is different than the ADF connections we have created earlier. Make sure that the connections name is the same as your Jdeveloper connection. Apply changes in EM and re-run your page.

Lesson: RTFM