Posts

Showing posts from 2011

Executing a method bindings In Bean method.

Image
Many time you be in a situation where there is a AM method exposed as a client and requirement is to execute that AM method from the backing bean. Its quite simple first you have to register that AM method in the page definition file as method bindings. Now choose the method you want to add to the page definition and executed by a bean method. for the parameter either you can use the bindings if your parameter clearly coming from bindings else leave them blank. Now in the bean method first you have to catch the handle of the DCBindingContainer and then using this binding container you can get the operation binding for the AM method and then can add the parameter. If you are have already bind the parameter with the bindings then can skip that. then you just need to call the execute method of your operation binding.

Creating rows in parent and child VO connected using a VL

Hi, Today I got stuck with the requirement where I had to display the parent and child in the input mode. My problem was I am having two VOs both are connected to each other using a view link and both are having the id column. This column is a primary key for the Employee table and foreign key for the Description table which in tern also have a id column. so my database schema is like this. EQUITY_USERS Name Null Type ------------------- -------- -------------- USERID NOT NULL NUMBER USER_NAME NOT NULL VARCHAR2(20) FULL_NAME VARCHAR2(20) ACTIVATION_FLAG NOT NULL VARCHAR2(10) DEACTIVATION_REASON VARCHAR2(2000) ADMINUSERID NUMBER LAST_UPDATED_DATE NOT NULL DATE

Date Effective property of VO.

Image
Some time we have come to scenarios when the validatity of the row is dependent over a column value of date type. A typical example of this is contractual employees, if the contract date is over we may not be interested these employees for the payrole. ADF provides a property effective date for this use case. Its quite easy to implement and in the VO by just setting a flag we can ignore these rows. For this example we are using default HR schema of the XE database, we will create a new table as the existing table does not solve our purpose. create table CONTRATUAL_EMP as select * from employees; alter table CONTRATUAL_EMP add (CONTRACT_END_DATE DATE); update CONTRATUAL_EMP set CONTRACT_END_DATE = sysdate -10 where mod(employee_id,2) =0; update CONTRATUAL_EMP set CONTRACT_END_DATE = sysdate + 200 where mod(employee_id,2) =1; commit; Now table is ready, We are moving to to project. please download the project from the link . Open this project and then run the page DisplayResult.jpx. No

ADF Simple Questions

Image
Managed Vs Backing Bean This question is almost asked in every jsff interview but yet there is quite confusion between two, I am putting down the difference between two 1. Managed bean will always be initiated and registered by adfc-config.xml. 2. Managed bean may have bindings for a number of components scattered though the project while Backing Bean must have the bindings only for a single page. 3. Scope of the backing bean will always request, while managed bean can be some of the different scopes. 4. Backing bean can be generated and self updated by option expose binding while creating a page. Jdev itself will add the binding of each component when you add it on page. 5. Backing bean most of the time overhead to the project as unnecessarily every binding is exposed. Logs in jdev (Integrated Weblogic) In jdev if debugger is on then a lots of logs are generated by jdev. Now sometimes if user want to go throw the logs or want to parse the logs then we can use inbuilt feature of the j

Creating Weblogic Domain with SOA support.

Image
This is the final post in continuation for the creation of the weblogic domain with the SOA support. In last two post I described component required and placement of the each artifact required for the creation of the SOA server. Now everything in place and we can start building a server which will support soa. There are two ways a SOA server can be configured 1. All in one Admin server 2. Soa server as a managed server to Admin server. In weblogic we can create a number of managed server under a admin server each of these managed server are like different serving point. In a cluster environment two or more managed server worked as a single unit, to increase availability. Each managed server can be controlled from Admin server and while startup it takes all the configuration related information from the Admin server. While for the study purpose its better to have a all in one admin server which take less resource to run and require less steps to shutdown or start, which we must have to

Current Date in ADF.

Image
In adf a number of places you want to set the currentDate as a default parameter, you can use the groovy expression to set this. Like for a bind parameter if you want to set the default value use the value option and set the currentDate from the adf. In case if you want to set the value less then 10 days to current date you can use it adf.currentDate -10. This will give you date 10 days less then current date. If you want date and time both you can use adf.currentDateTime. In some of the cases you may need to execute the custom methods defined in your entityImpl then you need to use adf.object for that. Like in the below case if a custom method has been coded in the entityImpl to get the default value like getDefaultDepartmentCode. If you need to set the same for your variable you need to use it adf.object.getDefaultDepartmentCode

Oracle Soa Server Installation

Image
Now we can start with soa specific installation. There is quite confusion over the oracle soa 11.1.1.3.0 installation. The issue is is a 11.1.1.3.0 patchset rather then a complete installer, hence first 1.1.1.2.0 need to be installed and then we need to install 11.1.1.3.0 at the top of it. So we need both the files, that is the reason I mentioned both the files in the prerequisite. 3. SOA Server Installation. 3.1 Unzip the files ofm_soa_generic_11.1.1.2.0_disk1_1of1.zip and ofm_soa_generic_11.1.1.3.0_disk1_1of1.zip both. 3.2 Start your database if not in the running condition. 3.3 Now go to the directory ofm_soa_generic_11.1.1.2.0_disk1_1of1\Disk1 and then click on setup.exe, it will ask you the location of your JDK. JDK is a part of the standard weblogic installation. So check the directory where you have installed the weblogic in the previous step jdk must be there, for me the location is D:\Oracle\MW_HOME\jdk160_21. Paste this location to the command window and pre

Creating a weblogic domain with SOA Server -11.1.1.3.0

Image
I was trying to install oracle soa server, but there was a lot of issues, I faced and then decide to write this blog. There is a lot of help available but the problem is its spread across a number of sites and documents. A developer with some basic knowledge and if want to learn Oracle Soa will be in the net of all these sites and documents to install a basic SOA server. So I am trying to point out the basic steps which need to configure a Oracle SOA server. Prerequisite There are number of pieces you need to download before starting the installation. my advice is first download all these files because these are quite large files and in the installation process you need all these files, which will make installation task 10-20 job once you have all these files. Another prerequisite is oracle database. That is must for SOA installation, if you don't have oracle database installed you may need to install oracle database too. I would advice to go for oracle xe, a small light weight

Take database schema dump and export

Today I need to migrate my schema from oracle xe in my system to another system which is a Linux box. I had to revisit a number of command, which is quite helpful. I used the export import utility provided by oracle. Its quite easy and straight forward. Step 1 Exporting schema to a dump file D:\Oracle\db\app\oracle\product\10.2.0\server\BIN>expdp system/**** schemas= hr directory=C:\Temp dumpfile=hrdump.dmp logfile=rexp.log Export: Release 10.2.0.1.0 - Production on Monday, 31 January, 2011 5:51:24 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productio n ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-39087: directory name C:\TEMP is invalid Then l reliesed that oracle does not know my directory. Then create this directory by login to database with user name and password system/****** sqlplus> create directory hrdump as 'C:\Te