Sunday, January 22, 2012

Building and Deploying Enterprise Application

If you are building enterprise application you should consider breaking down your modules into workspaces and then deploy these applications separately as shared libraries, then consume through user shell interface.

we will discuses here how to create and deploy shared library, and then how to call task flows in a dynamic region from different shared libraries.

Before we begin you should consider the naming convention and its uniqueness through shared applications. Each project or workspace must have its unique name, the packages inside should be unique as well, the model and viewcontroller projects should have also unique package naming, as an example ( (

In here we will create two applications, one will be the shared adf library packaged entirely built as ADF application (ChildApp), the second one the Main application (Parent App) that will call the taskflows as dynamic regions from the shared module.

For the ChildApp,  what you need to do after building it is to create a MAINFEST.MF file that have the appropriate extension name and version for your application, the MAINFEST.MF file should be created under src/META-INFO/ directory with the following entries:

Manifest-Version: 1.0
Implementation-Title: webBrain
Extension-Name: webbrain.shared.lib
Specification-Version: 1.0.0
Implementation-Version: 1.0.0
Implementation-Vendor: webBrain

You need to create two deployment descriptors, the first one will be as a WAR file with empty context root.

and then you need to add the MAINFEST file created to war options.

Then you need to deploy your war file to weblogic as shared library.

Then you have to create new deployment descriptor and deploy the application as ADF Library Jar file for the sake of compilation at the Main parent application.

At the Main Parent application you need to add the library under the libraries and classpth for your project.

add a dynamic region for your jsf page with managed bean to control the dynamic region taskflows.

modify or create the weblogic.xml file to point the shared library deployed to weblogic server.

remove the ADF Library from the deployment filters, then deploy the main Parent application.