Pages

Tuesday, February 28, 2012

Changing your ADF Connections in Enterprise Manager with PS5

With Patch Set 5 of Fusion Middleware you can finally change your ADF connections ( like a Web Service connection ) in the Enterprise Manager Web Application. So you can make one application deployment and deploy it to acceptance and production.
In many cases ADF and JDeveloper automatically creates connections ( like a ADF WS DataControl )  which could not be changed after deployment, you need to do this before deployment or change the EAR.
With PS5 you can change these connections in the "Configure ADF Connections" menu option on the application deployment ( EM ). This is also possible with WLST where you can change and persist the attributes of the application connection MBean.

If you want to do this you need to do the following steps

  • Have a WebLogic domain which has a configured MDS repository.
  • Add some listeners to the web.xml ( for the MBean support). 
  • Enable MDS ( else the connection details won't be persisted ).
  • Add an ADF Connection on the Web Service entry when you use a Web Service Proxy.   

In this blogpost I will show you the steps how to make this work and change in this example the endpoint of a web service.

We start for example by adding an ADF WS DataControl.


This will always add a ws connection to the connection.xml file in the ADF META-INF Folder.


This is also possible on a Web Service Proxy when you don't use an ADF WS DataControl.



Select the service and right click on Create ADF Web Service Connection.



Click on OK


Use the service and finish your Application.


Prepare your Application for allowing to change your ADF Connections.

First we need to add the ADFConnectionLifeCycleCallBack and the ADFConfigLifeCycleCallBack listeners  to the web.xml. This enables the ADF Connection Mbean support.


Enable User Customizations ( across sessions using MDS ) and Enable Seeded Customizations.


We are ready to deploy our application.

You should see the MDS and Connections Tabs when you deploy from JDeveloper.


Optional look at the connections.





After deployment we change the WSDL URL and endpoint in the Enterprise Manager.

First select your application deployment.


Here we can see our connection. Because we enabled MDS on the application we can change the connection else you won't see the Edit , Delete buttons.


Change the WSDL URL by clicking on the Edit button. Click on OK and apply the changes. The new URL is stored in the MDS repository.


Also click on Advanced Connection Configuration where we also need to change the endpoint address and click on Apply.


We are ready to test the application with the new WSDL url and endpoint.

Optional
You can also change these with WLST,
for this you need to go the System MBean Browser of EM to find your mbean for example oracle.adf.share.connections:ApplicationName=YourApp,Location=WLSserver,name=ADFConnections,beantype=Runtime,type=ADFConnections,Application=YourApp


11 comments:

  1. Hi Biemond,

    I made a post in my blog in how to use the OSB ” **Respository ” classes to read any OSB project resources programmatically at runtime. As a reader and admirer of your blog, I would like your feedback in this post, because I did not find much information about this approach on the internet:

    http://gibaholms.wordpress.com/2012/02/23/read-xml-resource-in-oracle-service-bus-11g/

    Thanks,
    Gilberto Holms

    ReplyDelete
  2. Hi,

    I am a beginner in Oracle Fusion.

    Can i know the compatible SOA Suite for Windows 7 64bit? If there is not any, can anybody suggest me how to install the available version in to Windows 7 64bit.

    Thank You.

    ReplyDelete
    Replies
    1. Hi,

      it works perfectly.

      download wls generic, jvm 64, rcu , xe database and soa suite
      install xe db, rcu schemas , jvm 64 , wls and soa add on.
      Then make a domain and select the soa suite option.

      good luck , there are many document and blogs about this installation.

      thanks

      Delete
    2. Just a small update. This is not possible with 11.1.1.6 - 12c. The support for an xe DB has been removed. you would need a standard or enterprise version of the database to do this.

      Delete
  3. In many cases ADF and JDeveloper automatically creates connections ( like a ADF WS DataControl ) which could not be changed after deployment, you need to do this before deployment or change the EAR.

    Can plan.xml work for making the change mentioned above ? We have the same use case but we are not on ps5. How do we accomplish it predeployment or even at deployment ?

    ReplyDelete
  4. Hi, would like to ask if we can handle the availability of the EndPoint address in ADF?
    I have 3 cases.
    1. Blank endpoint address: will throw an exception.
    2. endpoint address with prefix. ex. AAAAAhttp://. This will not call the service and will throw malformedURL Exception.
    3. endpoint URL with suffix.: ex. http://BBBBBBB. This is weird. It still able to call the service. Even through the endpoint URL is invalid because of the suffix.

    Can we handle these cases?

    Thanks.

    ReplyDelete
    Replies
    1. Hi,

      I don't know but you can change it in the enterprise manager ( em console )

      Delete
  5. Do you have any idea to list all mbeans to change the url parameter?

    ReplyDelete
  6. Hello Edwin
    ¿Do you have any sample of WLST script to edit ADF Connections?
    Thanks in advance
    Regards,
    Light

    ReplyDelete
  7. Hi,
    I have created a ADF Connection but the Advanced Connection Configuration button is disabled. Any idea why É

    ReplyDelete
  8. Hi I did make chnages as per post, did enable the MDS as mention in Post but i am not able to edit connection in EM...any idea?

    ReplyDelete