|Receive Email for New Articles|
|OA Framework Extension of AM - Steps - How To||| Print ||
|Written by Anil Passi|
|Friday, 12 January 2007|
In the Part-1 of Application Module extension, we saw the business case for extending an Application Module. Here in the Part-2 of OA Framework Training, for Extensions of AM, I will display Steps with screenshots.
Step 1. Download the jad utility
Go to www.google.com
Step 2. In my case, I have <jdevhome>/jdev/myprojects included in my CLASSPATH. Hence I ftp'ed the files to <jdevhome>/jdev/myprojects/oracle/apps/per directory tree.
Step 3. ->Create a new BC4J Package, by right clicking on Project.
->The AM that we wish to extend resides in oracle.apps.per.irc.candidateSelfService.server
Hence, our package name will be oracle.apps.xxper.irc.candidateSelfService.server
Ensure that XXPER is valid Application short name.
select 'x' from fnd_application_vl where application_short_name = 'XXPER'
->Click on Finish.
Step 4. We can see that, for VisitorAM, the RETENTION_LEVEL is MANAGE_STATE.
Hence we will ensure that our new AM will have the same property too.
--> Right click on the new BC4J, and create a new AM.
-->Name of the new AM will be xxircVisitorAM
In the Extends field, click browse and select the AM as shown below.
-> Keep on clicking next until you see Finish. Click on Finish.
--> You will notice that class xxircVisitorAMImpl has been created. Add the below method to that class.
public String validateLogin(String s, String s1)
String parentValidationResult = super.validateLogin(s,s1) ;
//raise your event here, or insert into some bespoke table
Step 6. Ensure that the properties and the same, and also ensure that your method being replaced is selected.
Double click on the newly created AM xxircVisitorAM and ensure that RETENTION_LEVEL is MANAGE_STATE.
Also, click on ClientMethods, and ensure that the method validateLogin has been selected.
Step 7. Perform Substitution. Right click on the project, and select "Edit Business Components Project"
Click on Substitution, and select xxIrcVisitorAM on left hand side, and VisitorAM on right hand side. Click on Add button.
Step 8. Your jpx file will look like below
<?xml version="1.0" encoding='windows-1252'?>
<!DOCTYPE JboProject SYSTEM "jbo_03_01.dtd">
<Attr Name="_version" Value="22.214.171.124.75" />
<Attr Name="_jprName" Value="xxircVisitorAM.jpr" />
<Attr Name="_ejbPackage" Value="false" />
<Substitute OldName ="oracle.apps.xxper.irc.candidateSelfService.server.xxircVisitorAM" NewName ="oracle.apps.per.irc.candidateSelfService.server.VisitorAM" />
Name this file as xxVisitorAM.jpx
Now, load this jpx into Database using a shell similar to below.
MACHINE_NAME=`sqlplus -s apps/$APPS_PWD <<EOF
set pages 0
set lines 1023
select fnd_profile.value('CSF_EMAP_DS_HOST') || '.ad.ic.ac.uk' from dual ;
PORT_NUMBER=`sqlplus -s apps/$APPS_PWD <<EOF
set pages 0
set feed off
select fnd_profile.value('CSF_MAP_DB_PORT') from dual ;
oracle.jrad.tools.xml.importer.JPXImporter ./xxVisitorAM.jpx \
-username apps \
-password $APPS_PWD \
Step 9. FTP all the files from directory tree xxper to $JAVA_TOP/oracle/apps/xxper/..
Bounce apache, and you will notice that your custom logic is now being invoked.
written by Jay , May 04, 2007
written by anil passi , May 04, 2007
written by Isha , July 04, 2007
written by suresh kommula , August 31, 2007
written by Kannan Balasubramanian , September 10, 2007
written by SenthilKumar , October 30, 2007
New AM causes Lov Failure
written by Ronel T , February 06, 2008