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 (com.google.hr) (com.google.crm).


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.

Wednesday, January 11, 2012

Arabic Hijra Calender - UM AL-Qura


I almost done developing Hejira Calender using ADF as declarative component. The calender is based on Um AL-Qura, and can be used inside pages, fragments, popups and tables. The calender relies on database and uses pure ADF without any JavaScript injection.




Successfully configured Oracle Report Server 11.1.1.2 to generate Arabic PDF reports

Today I Successfully configured Oracle Report Server 11.1.1.2 to generate Arabic PDF reports. really it was headache, and turns out to be a bug at the end.

Friday, December 30, 2011

Reference attributes in other view objects using groovy

This post is based on a question I asked to Mr.Andrejus Baranovskis's on his public Wiki. How to reference attributes in different view objects through groovy.

 And he answered me that its doable after exposing the ViewLink Accessor between the two view objects and then accessing the attribute through ViewlinkAccessor.AttributeName

He posted the last post for this year on his blog with an example, just follow the link:

http://andrejusb.blogspot.com/2011/12/groovy-with-view-link-accessor.html


Friday, December 16, 2011

Add Custom validator - nicely attached to InputText Field

After building your business components, and adding your view object through data controls to the jspx or jsff page as editiable field you need to do the following:

- Add a new Java bean to your application resources in my case I named it TestValidation.
- Select the InputText field, and in property inspector go to Behavior property, then inside Validator area select edit to add new custom validator.





- Then it will build a method inside your bean with list of params will be used during validation phase.






-  Write the business logic you need to check the value of the input filed, the object param contains the new entered value.
- Then throw the validationException with custom message to your current FacesContext.
- At runtime you will get a nicely error message attached to the InputText field.



Monday, December 12, 2011

I did technical review on this book - Oracle ADF Enterprise Application Development—Made Simple

  • Develop an ADF application quickly using database tables together with common ADF user interface components and data visualization components.
  • Estimate the effort required to build an ADF enterprise application.
  • Organize the development team, choose support tools, and write development guidelines to ensure a uniform development approach.
  • Set up the necessary infrastructure and configure a development workstation.
  • Develop necessary templates and framework classes to allow productive and flexible development.
  • Build a complete application using all the enterprise support tools.
  • Test your ADF enterprise application at the component, integration, and system levels.
  • Use skinning to change the look of the application to correspond to the enterprise's visual identity.
  • Customize the application to meet the needs and expectations of different users.
  • Secure the enterprise application and assign roles for specific functionality.
Book in Details

    Sunday, December 4, 2011

    Redeveloping an Oracle Forms Application with Oracle ADF

    A very nice presentation by Oracle about Oracle Forms migration to Oracle ADF. The main idea there is no magic bullet you have to do some work but Oracle try making it easy to migrate.

    See the below like for more details, you can go directly to minute 14 to skip the intro:

    Oracle Forms to ADF migration

    Sunday, September 18, 2011

    oracle.jbo.NotConnectedException: JBO-25200 While using View Criteria

    This error "which i think its a bug in JDeveloper 11g Release 2", appeared while building view criteria with bind variable inside the SQL query using read-only view.

    While developing a view object based on SQL query I add a where condition in which it select a specific employee information as an example " (where empno=:empno) " from details table in which it will return multiple records, then I wanted to build a view criteria on this view object to filter the result based on another attribute.

    So while the page begins loading, it throws the following exception:

    oracle.jbo.NotConnectedException: JBO-25200:.
    at oracle.jbo.server.DBTransactionImpl.checkConnected(DBTransactionImpl.java:6810)
    at oracle.jbo.server.DBTransactionImpl2.createPreparedStatement(DBTransactionImpl2.java:398)



    And the application stops working since the connection to the database is lost.

    The error message is not clear to what is happening inside the application flow, and it does not provide enough information about the actual error. But eventually and after building the project from scratch, I discovered that the bind variable used inside the SQL query as discussed before, should be set to HIDE value under control hints.

    Finally got it to work... :)

    Wednesday, December 29, 2010

    Oracle CSService Hangs on Single Node with ASM, on Remote Machine

    It was a while since I posted anything, don't know why...!

    Any way, I faced a problem during the last two days, the network admin decided to move to new domain and one of the technicians decided to move the database at one of the remote location we have to the new domain, every thing was working fine until one of the databases on that machine crashed.

    So, when I tried to login as /sysdba it kept saying insufficient privileges, but when logging using sys account with password it worked fine. I tried to startup the database but it couldn't connect with ASM due to insufficient privilege again. I was logging as domain admin to the machine, and tried the same thing using local admin with the same problem, even though, I tried to change the authentication method in the SQLNET.ORA file from NTS to NONE, but I kept receiving the same error.


    I even added the the local administrator to dba_ group under windows group, but with no success. When I decided to restart the machine, the remote desktop didn't connect and the machine seemed to be hanged.

    I tried to connect to the management console, it connects which mean the server is working, so , I doubted that there is an oracle service causing these problems. At first, I needed to connect to the machine using Remote Desktop, so I connected through, register editor to the remote machine, then I disabled all oracle services (in REGEDIT), and issued a restart command on the machine using shutdown line command (shutdown -r -m \\xxx.xxx.xxx.xxx).


    I was connected using RDP, then I tried to start oracle services one at time, but the OracleCSService couldn't be started. So, after checking the log file of the cssd service, I noticed that crsctl.exe check boot keeps return an error and it stuck in infinite loop, I  build the OCR file used by this service using 

    ORACLE_HOME of 10g\bin\clscfg.exe -local 
    -o ORACLE_HOME of 10g
    -l AMERICAN_AMERICA.WE8ISO8859P1


    then I changed the logon owner of all oracle service to local system on services properties, and it worked the CSSD is up and running, it seemed that the local OCR file used by cssd is corrupted due to service failure, which prevented oraclecsservice from starting and as a consequence it blocked the RDP connection.

    And, When changed the logon owner of all oracler service, the insufficient privilege disappeared also and the database is up and running.

    Then I've changed the listener.ora file and tnsnames.ora file with server address than server name and restarted the listener.