Pages

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 10.1.3.4 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 10.1.3.4 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.

10 comments:

  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

    ReplyDelete
  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(ALSBPublishOperation.java:532)
    at com.bea.alsb.server.publish.ALSBPublishOperation.doImport(ALSBPublishOperation.java:421)
    at com.bea.alsb.server.publish.ALSBPublishOperation.publishNewContainer(ALSBPublishOperation.java:298)
    at com.bea.alsb.server.publish.ALSBPublishOperation.execute(ALSBPublishOperation.java:150)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1189)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:744)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:607)
    at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:503)
    at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
    at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
    at org.eclipse.wst.server.core.internal.ServerWorkingCopy.publish(ServerWorkingCopy.java:635)
    at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    And other doubt:

    How do you set the business services File.biz? Where do you using?

    Can you help to me, please?

    Thanks you very much.

    ReplyDelete
  3. Hi, the file biz a test.

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

    thanks Edwin

    ReplyDelete
  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

    java.lang.reflect.UndeclaredThrowableException
    at $Proxy19.getEditPage(Unknown Source)
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite.initCustomFields(TransportSpecificComposite.java:100)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createTransportArea(CustomAbstractResourceSpecificComposite.java:148)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createControls(CustomAbstractResourceSpecificComposite.java:141)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createClient(CustomAbstractResourceSpecificComposite.java:133)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.performDynamicUpdate(CustomAbstractResourceSpecificComposite.java:339)
    at com.bea.alsb.ui.resources.service.editor.TransportSpecificServiceEditorPage$TransportSpecificEditorComposite.performDynamicUpdate(TransportSpecificServiceEditorPage.java:183)
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite$3.run(TransportSpecificComposite.java:260)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3664)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3301)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    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: {http://xmlns.oracle.com/pcbpel/wsdl/jca/}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!

    ReplyDelete
  5. Hi,

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

    thanks edwin

    ReplyDelete
  6. Ok Edwid! I did it.

    Thanks!!!

    ReplyDelete
  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

    ReplyDelete
  8. Hi,

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

    Thanks Edwin

    ReplyDelete
  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!

    ReplyDelete
  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.

    http://biemond.blogspot.com/2009/07/using-aq-jms-text-message-in-wls-1031.html

    ReplyDelete