Friday, February 13, 2015

Deploy ADF Library Jar as shared library and refer it from Consuming App

In this post I will explain a way to create an ADF application consisting of task flows as ADF Library jar and deploy it as shared library and then refer it in your Consuming Application. In this scenerio, we will not be creating a WAR, rather we will be deploying ADF Library Jar as shared library.
In this case we dont need to create weblogic.xml . We will use weblogic-application.xml which is already there in META-INF folder when we create ADF Application.

Created an ADF Application TaskFlowFirstApp.

The TaskFlowFirstApp is just having a TaskFlow with one fragment which displays Departments table out of DepartmentsVO.



The Task Flow application is deployed as a ADF Library Jar.  While creating the deployment profile for ADF Library Jar, need to add the MANIFEST.MF File like below.




The MANIFEST.MF file is in TaskFlowFirstApp\src\META-INF and has below entry.




After this, deploy the ViewController project as ADF Library Jar to a folder.

Now we need to deploy the adf library jar to weblogic. Open the console and go to deployments. Install and provide the path for the adf library jar.


We can do build scripts to deploy the same in actual project.

Do a Next on next screens , do a Finish and Save. The ADF Library Jar will be deployed as a shared library and will be available under deployments.



Now lets create a ConsumingApplication. It has been given the dependency of the same TaskFlowFirstApp library jar. Here also make sure Deploy By Default is unchecked.



Created a page with taskflow from the ADF Library Jar which will be shown in Component palette drop down after you refresh.

Now we need to refer the deployed adf library jar in consuming application. We will do this by adding an entry in weblogic-application.xml




We are all done now. Deploy the ConsumingApplication as EAR on the weblogic server as a Stand Alone Application.



Now just run the page and check the results. The Application references the task flow from TaskFlowFirstApp and renders the fragment.



So the ADF Library Jar's can also be deployed as shared library directly and can be referred from ConsumingApplication.

TaskFlowFirstApp_Adf_Lib

ConsumingApplication

Thanks



8 comments:

  1. very nice post, thank you for posting this.
    for Latest Tech News check my blog Latest News Update 24x7.

    ReplyDelete
  2. a new line is missing in manifest.mf in your example. Implementation-Version can't be read.

    ReplyDelete
  3. Hi Rohan,

    Thanks for the post. Everything is fine except that if we give security the shared task flow is not visible on the page. Can you please let me know what was the issue.

    ReplyDelete
    Replies
    1. hello Rajesh, so what was the answer of your problem ?

      Delete
  4. Hi rohan,
    it's works on local but in the case of server deployment it doesn't work.
    plz help..

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Hi Rohan,

    I am trying something like this. I am deploying shared libraries on weblogic sever then added entry into weblogic-application.xml of main application. However when i deploying the main application i am getting below error.

    Unable to bind Business Interface to the JNDI name: PSC_LNPRESTWebServiceWebApp_waroracle_apps_fnd_applcore_common_ApplSessionServiceBean_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface oracle.apps.fnd.applcore.common.ApplSessionService to ApplSessionService. Another EJB has already bound an interface to that name.; remaining name 'ApplSessionServiceBean#oracle/apps/fnd/applcore/common'. NestedException Message is :[EJB:011224]Unable to bind the interface oracle.apps.fnd.applcore.common.ApplSessionService to ApplSessionService. Another EJB has already bound an interface to that name.

    ReplyDelete
  7. BlueHost is ultimately the best website hosting company for any hosting services you might need.

    ReplyDelete