Thursday, June 11, 2009

Using AQ in an OSB 10.3.1 Proxy Service

In my previous blogpost I already showed you how to use a JCA Database adapter in a Business Service. In this blog I will use the AQ resource adapter in a OSB 10.3.1 Proxy Service. To make this work I use the Oracle Workshop for the OSB configuration and JDeveloper for AQ adapter configuration. I heard from Oracle that in one of the next 11g releases you can do this all in JDeveloper.
We start in the WLS console of the OSB Server. Go to the deployments and find the AqAdapter resource adapter.
Open the AqAdapter and select the configuration Tab where we will create a new outbound connection pool.
Provide the JNDI name, I'll use the JDeveloper name convention. eis/AQ/xxxx , xxxx is the database connection name in JDeveloper.

Give the resource adapter plan a unique name and save this AQ plan.

Select the just created JDNI configuration.

We have provide the xADatasourceName. This is a datasource of WLS which connects to a Oracle schema user which has access to the AQ queues. Or you can provide the jdbc url , username and password.

We are finished with the Weblogic configuration and we can switch to JDeveloper where we will make the AQ configuration files which we have to import in our OSB project.
Make a new ESB project where we will add the AQ adapter to the ESB configuration. The JNDI name in the AQ adapter wizard must match with the JNDI eis name of the AQ resource adapter in the WLS console.

This OSB proxy service read from the queue so we need to dequeue.

Browse or provide the schema /queue name

And select a XSD which matches with the AQ messages.

Delete the router service we don't need this.

The last part is to use this AQ queue in a OSB proxy service, Start the Oracle workshop and import AQ wsdl's and schema's into your OSB project.

Create a new Proxy service and use the AQ WSDL. OSB will detect the JCA adapter configuration.

Now we only have to provide the JNDI name in my case eis/AQ/xxxxx
That's all for the AQ configuration.


  1. Thank you! Edwin.

    Just one question met while following your guide. I failed to generate the wsdl file for AQ Adapter in JDev, as its Wizard didnt show any queue created in DB. Any help or suggestion on this?

    Thanks a ton!
    Sam Yee

  2. Hi!

    I have a problem where I try publish a project. The publish fails and shows the following message:

    Message: Task failed

    Exception Stack Trace:

    org.eclipse.core.runtime.CoreException: Conflicts found during publish.
    at com.bea.alsb.server.publish.ALSBPublishOperation.checkPublishStatus(
    at com.bea.alsb.server.publish.ALSBPublishOperation.doImport(
    at com.bea.alsb.server.publish.ALSBPublishOperation.publishNewContainer(
    at com.bea.alsb.server.publish.ALSBPublishOperation.execute(
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.performTasks(
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishToServer(
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(
    at org.eclipse.wst.server.core.internal.Server.doPublish(
    at org.eclipse.wst.server.core.internal.Server.publish(
    at org.eclipse.wst.server.core.internal.ServerWorkingCopy.publish(

    And other doubt:

    How do you set the business services Where do you using?

    Can you help to me, please?

    Thanks you very much.

  3. Hi, the file biz a test.

    Can you delete the project before you publish. there is a conflict somehow

    thanks Edwin

  4. Hi Edwin!

    Can you help me with this error? I have a project in OSB and I have a problem with the Adapters. I need urgent resolved this because take several days and I can't find the solution.

    Every time I open the JCA Transport Configuration tab, this is white and displays the following error:

    An error occured while initializing transport fields: null

    at $Proxy19.getEditPage(Unknown Source)
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite.initCustomFields(
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createTransportArea(
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createControls(
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createClient(
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.performDynamicUpdate(
    at com.bea.alsb.ui.resources.service.editor.TransportSpecificServiceEditorPage$TransportSpecificEditorComposite.performDynamicUpdate(
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite$
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(
    at org.eclipse.swt.widgets.Display.runAsyncMessages(
    at org.eclipse.swt.widgets.Display.readAndDispatch(
    at org.eclipse.ui.internal.Workbench.runEventLoop(
    at org.eclipse.ui.internal.Workbench.runUI(
    at org.eclipse.ui.internal.Workbench.access$4(
    at org.eclipse.ui.internal.Workbench$
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Later when I try published the project displays the following error:

    Conflicts found during publish.

    Invalid JCA transport endpoint configuration, exception: javax.resource.ResourceException: JCA-12561Unable to locate the JCA Resource Adapter via WSDL port element jca:address.
    The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element: {}address: location='eis/AQ/CWDataHub'.
    The reason for this is most likely that either
    1) the Resource Adapters RAR file has not been deployed successfully to the WebLogic J2EE Application server or
    2) the JNDI location setting in the WebLogic JCA deployment descriptor has not been set to eis/AQ/CWDataHub. In the last case you might have to add a new 'connector-factory' entry (connection) to the deployment descriptor.
    Please correct this and then restart the BPEL/WebLogic Application Server.

    Thanks you very much!

  5. Hi,

    can you send the wsdl to biemond st gmail dot com=

    thanks edwin

  6. Ok Edwid! I did it.


  7. Hi Edwin.
    We followed your steps and we have configured an AQ Adapter. We have a queued message but the AQ Adapter doesn't dequeue this message. Any help or suggestion on this?
    Thanks in advance

  8. Hi,

    Did you restart wls and is the wls server the target of the datasource

    Thanks Edwin

  9. Hi!
    Yes. We already restart the wls and configured it as target of the datasource but we still have the same problem. The Adapter doesn't connect to the queue.
    The Connection to the database is working fine.

    We appreciate your help!

  10. Ok,

    let try to publish a message to aq then you must see an error.

    or try the messaging option and use the foreign server with aq.