Wednesday, 6 March 2013

ADF : How to write methods in Application Module

Application Module provides two Java files for writing codes and implementing business logic. It has two Java files :
  1. <AMName>Impl.java file for Implementation classes
  2. <AMName>DefImpl.java for Definition classes
<AMName>Impl.java file is where we write our code mostly to implement business logic.

To generate the files :


1. Set the preference from Tools > Preferences>business Components and click check for files you need. The checked type of files will be generated automatically while creating Application Module. Same is true for EOs and VOs.








2. If the preference is not set, while creating an Application Module. You can mention the option of creating Java Files.








3. If point1 and point2 has not been done, then also you can create the java files after creation of AM by going to Java tab and click on the desired file type.



Once the <AMName>Impl.java file is generated, open it and write a code. Let us write a simple code to add three integers.

public Integer AddNumbers (Integer num1, Integer num2, Integer num3)
    {
    Integer finalNum = num1 + num2 + num3;
    return finalNum;
    }


Next step is to go to client Interface section of <AMName>AM.xml file and expose this method from client interface.


 Now run this method in business component browse. To do that, right click on Application Module and say RUN.
From the new window window that came up, select Application , right click and select Service method.
Provide the input and test the result.


Thursday, 21 February 2013

Oracle XE : To get started

This post is how to get started with an underlying DB (oracle XE) and the required connection from Jdeveloper. Oracle XE is light weighted and suffice for all development work for ADF and other fusion middleware technology tech stack.

To download and install

  1. Follow this link to download Oracle XE 11g release 2:  http://www.oracle.com/technetwork/products/express-edition/downloads/index.html (It has link for both windows and Linux edition)
  2. To Install  : Unzip OracleXE112_Win32 and run setup.exe from DISK1 folder.
  3. To start the Database 
    1. On Windows: Click Start, point to Programs (or All Programs), point to Oracle Database 11g Express Edition, and then select Start Database.
    2. On Linux with Gnome: In the Applications menu, point to Oracle Database 11g Express Edition, and then select Start Database
    3. On Linux with KDE: Click the icon for the K Menu, point to Oracle Database 11g Express Edition, and then select Start Database.
    4. OR, At the operating system prompt, enter the following command to start the SQL Command Line and connect to the database:
      SQLPLUS / AS SYSDBA 
    5. At the SQL Command Line prompt, enter the following command:
      SQL> STARTUP 
    6. Use the same SQL prompt to create the DB objects and when done type EXIT to come out of the SQL prompt.
  4. To Stop the Database 
  1. On Windows: Click Start, point to Programs (or All Programs), point to Oracle Database 11g Express Edition, and then select Stop Database.
  2. On Linux with Gnome: In the Applications menu, point to Oracle Database 11g Express Edition, and then select Stop Database.
  3. On Linux with KDE: Click the icon for the K Menu, point to Oracle Database 11g Express Edition, and then select Stop Database.
  4. OR, At the operating system prompt, enter the following command to start the SQL Command Line and connect to the database:
    SQLPLUS / AS SYSDBA
  5. At the SQL Command Line prompt, enter the following command: SQL> SHUTDOWN IMMEDIATE 
To get connected to Oracle XE from Jdeveloper11g , following default setting works :


Tuesday, 19 February 2013

Webcenter - Why and What








Why Webcenter 
  • Earlier internet pages were static. They used to provide information and with reader used to build only one way communication. New age internet on the contrary is more dynamic, interactive and allows readers to change the content of web page while they are reading.  We refer it as Web 2.0.
  • Web 2.0 site allows users to interact and collaborate with each other. For example, Discussion forums, wikis, blogs, RSS feeds, social networking sites etc.
  • With change of face of internet, the need has also arise of making website that are more interactive, dynamic and allows two way communication. Oracle webcenter helps building such applications.

What is Webcenter 
  • Oracle WebCenter provides design time and runtime tools for building enterprise portals, transactional websites, and social networking sites. 
  • It provides faster and effective ways of building Web 2.0 applications.
  • Sample Oracle webcenter applications are intranets, extranets, dashboards, blogs, wikis, community discussion forums etc.
  • Oracle Webcenter comes as a complete suite which has server and services (that allows web2.0 features) and frameworks like Oracle Webcenter portlets.

Pic courtesy : Oracle Webcenter Developer Guide
Webcenter Architecture

  • Oracle Webcenter Portal Framework allows creation of dynamic portals
  • Oracle Webcenter services offres varied range of functionality and can be consumed portals
  • Composers allowed run time customization of pages.
  • Webcenter spaces allows social collaborations