1. The document describes how a custom Java applet integrates with Oracle Forms to provide recipe/formula/routing design functionality. It discusses communication between the applet and Forms, the structure of the applet code, debugging techniques, and setup instructions.
2. The applet code is divided into common, client, and server packages. The client code runs in a browser and communicates with server code via data managers. Server code interacts with the database through JDBC and PL/SQL packages.
3. Debugging involves using print statements in the client code and log files in the server code. The applet is set up by configuring the JDeveloper IDE and importing required Forms
Presentation showing that writing tests is not really hard with examples on testing a simple class, testing with dataproviders, fixtures, mocks, stubs, databases and how to use zend framework bootstrap for MVC testing.
Given at php|tek 09 unconf sessions.
Presentation showing that writing tests is not really hard with examples on testing a simple class, testing with dataproviders, fixtures, mocks, stubs, databases and how to use zend framework bootstrap for MVC testing.
Given at php|tek 09 unconf sessions.
Использование GMock для обеспечения спокойной и сытой жизни разработчика. Обзор как верхушки так и некоторых подводных частей GMock. Разбор возможностей фреймворка на примерах.
Test your code like a pro - PHPUnit in practiceSebastian Marek
The day you realised that you can’t really tell what your code does is the day you stop being an amateur programmer and you turn into a professional developer. During this workshop you will learn about the most famous unit testing framework – PHPUnit, how it can help you gain confidence in your code and what to do (and what to avoid) to make your code testable. We will discuss unit testing best practices and talk about tools that can help you automate the whole process, so it becomes more of a habit then a necessity.
Oracle 11g new features for developersScott Wesley
Abstract: There are a wealth of new features available in the 11g database release. This presentation touches on SQL & PL/SQL features I found of interest, and concentrates particularly on virtual columns.
Relevant scripts found at my blog
http://grassroots-oracle.com/2009/07/presentations.html#11gNewFeatures
Использование GMock для обеспечения спокойной и сытой жизни разработчика. Обзор как верхушки так и некоторых подводных частей GMock. Разбор возможностей фреймворка на примерах.
Test your code like a pro - PHPUnit in practiceSebastian Marek
The day you realised that you can’t really tell what your code does is the day you stop being an amateur programmer and you turn into a professional developer. During this workshop you will learn about the most famous unit testing framework – PHPUnit, how it can help you gain confidence in your code and what to do (and what to avoid) to make your code testable. We will discuss unit testing best practices and talk about tools that can help you automate the whole process, so it becomes more of a habit then a necessity.
Oracle 11g new features for developersScott Wesley
Abstract: There are a wealth of new features available in the 11g database release. This presentation touches on SQL & PL/SQL features I found of interest, and concentrates particularly on virtual columns.
Relevant scripts found at my blog
http://grassroots-oracle.com/2009/07/presentations.html#11gNewFeatures
Когда тестировать, что тестировать, как тестировать, Как ускорить тесты и упростить их написание. Отказываемся от классических фикстур в пользу динамически создаваемых моделей.
Дмитрий Демчук. Кроссплатформенный краш-репортSergey Platonov
Доклад будет посвящен возможностям библиотеки Google Breakpad по созданию краш-репорта. Посмотрим как это работает изнутри.
На примерах будут рассмотрены способы интеграции библиотеки на разных платформах Windows, Linux, Max OS.
CommissionCalculation/build/classes/.netbeans_automatic_build
CommissionCalculation/build/classes/.netbeans_update_resources
CommissionCalculation/build/classes/commissioncalculation/CommissionCalculation.rs
CommissionCalculation/build/classes/commissioncalculation/SalesPerson.rs
CommissionCalculation/build/classes/CommissionCalculation.classpublicsynchronizedclass CommissionCalculation {
public void CommissionCalculation();
publicstatic void main(String[]);
}
CommissionCalculation/build/classes/SalesPerson.classpublicsynchronizedclass SalesPerson {
privatefinal double fixedSalary;
privatefinal double commissionRate;
privatefinal double salesTarget;
privatefinal double accelerationfactor;
private String name;
private double totalComm;
private double annualSales;
public SalesPerson saleperson;
public double getTotalComm();
public void setTotalComm(double);
public SalesPerson getSaleperson();
public void setSaleperson(SalesPerson);
public String getName();
public void setName(String);
public void SalesPerson();
public void SalesPerson(String, double, double);
public void SalesPerson(double);
public double getAnnualSales();
public void setAnnualSales(double);
public double getCommission();
public double getAnnualCompensation();
}
CommissionCalculation/build.xml
Builds, tests, and runs the project CommissionCalculation.
CommissionCalculation/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.7.0_25-b15 (Oracle Corporation)
NetBeans-Own-Library: true
org/netbeans/modules/java/j2seproject/copylibstask/Bundle.properties
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
#
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
# Other names may be trademarks of their respective owners.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common
# Development and Distribution License("CDDL") (collectively, the
# "License"). You may not use this file except in compliance with the
# License. You can obtain a copy of the License at
# http://www.netbeans.org/cddl-gplv2.html
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
# specific language governing permissions and limitations under the
# License. When distributing the software, include this License Header
# Notice in each file and include the License file at
# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the GPL Version 2 section of the License file that
# accompanied this code. If applicable, add the following below the
# License Header, with the fields enclosed by brackets [] replaced b.
Innovative Specifications for Better Performance Logging and MonitoringCary Millsap
Imagine a car with no speedometer. There are speed limit signs and policemen all around with radar guns waiting to catch you speeding, but you have no way of knowing how fast you're going. Of course, a car like this has no openable hood (no bonnet), so to change the air filter, you have to hire a specialist to saw into the body of your car. A car like this would be preposterous. Yet people write software like this all the time.
The Oracle Database has some of the best performance logging features built into it of any software in the world. You can use it with any application—even applications that were built without logging and monitoring in mind. But you can go SO much further if you bother to include some performance logging features in your application. In this session, I explain Oracle's extended SQL tracing feature and describe how to enable and disable it. Then I show some innovative ideas that will help you design and build database applications that are easier to monitor, manage, and maintain throughout the software development life cycle.
1. GMD Designer --for Recipe/Formula/Routing
1, Forms and Designer Communication
2, Designer Code Analysis
3, Debugging
4, Setup
5, Testing
1, Forms and Designer Communication
1.1), From Forms to Designer:
In design phase, create a Bean Area type item in forms and set its class as oracle.apps.fnd.formsClient.AppletAdapter,
it behaves as a middle man between applet and forms. For example GMDRCDSG.fmb, GMDRTDSG.fmb
Use package FNDAPLT to init applet, in the following way for example:
FNDAPLT.Applet_Init(
'DESIGNER.BEANAREA',
'GMDREDSG01',
'oracle.apps.gmd.recipeDesigner.javaui.RecipeDesigner',
l_paramlist);
During runtime, forms communicates with applet by the following way:
SET_CUSTOM_ITEM_PROPERTY('DESIGNER.BEANAREA', '%', 'GMDREDSG01:OPEN_RECIPE:'
||':'||:PARAMETER.CUR_RECIPE_ID);
Note: In the following, RecipeDesigner.setProperty method will be called.
1.2), From Designer to Forms
Designer communicates with Forms by using java class UserAreaSender to send messages, sample code:
private void callFormRefreshRecipeId(String recipeId) {
if (m_uaSender != null) {
m_uaSender.removeAll();
m_uaSender.add(recipeId);
m_uaSender.send("CALL_REFRESH_RECIPE_ID");
}
}
2. There is a trigger WHEN-CUSTOM-ITEM-EVENT on Bean Area, for example:
And trigger code:
DESIGNER.Handle_Applet_Events;
It’s a plsql procedure in this forms file, and it will handle events from java code, for example, corresponding code for
above event “CALL_REFRESH_RECIPE_ID”:
ELSIF (:system.custom_item_event = 'CALL_REFRESH_RECIPE_ID') THEN
………
ELSE
This is all how forms communicates with custom applets.
2, Designer Code Analysis
Designer uses a C/S implementation, client side runs in browser’s java applet while server runs as a part of EBS’s tcf
service.
2.1), Overall code
There are three packages:
oracle.apps.gmd.recipeDesigner.common $GMD_TOP/ java/recipeDesigner/common
oracle.apps.gmd.recipeDesigner.javaui $GMD_TOP/ java/recipeDesigner/javaui
oracle.apps.gmd.recipeDesigner.server $GMD_TOP/ java/recipeDesigner/server
common package, as it states, is shared by javaui/server packages.
Note: code is shared by recipe/formula/routing designers.
2.2), client code
2.2.1), RecipeDesigner.java
actionPerformed
This method is called when you operates in the designer. For example, when you click File -> save, a
command “SAVE” is passed to this method.
setProperty
When forms calls SET_CUSTOM_ITEM_PROPERTY, this method will be called. For example,
if ((command.toUpperCase()).equals("OPEN_RECIPE")) {
// we are opening the given recipe
Constants.RECIPE_ID = Integer.valueOf(paramTokens.nextToken()). intValue();
m_isNewRecipe = false;
refresh(false, true, true, true, true);
3. }
2.2.2), MaterialDataManager/FormulaDataManager
This class is used by RecipeDesigner to exchange data with data servers on server side, for example,
MaterialDataServer.
2.3), server code
2.3.1), MaterialDataServer
It routes requests from client’s DataManager to server’s TreeServer. It uses Item.java as the medium of data
exchange. The data format is like:
T01:V1:6,T00:V170:2460460................................
2.3.2), MaterialTreeServer
It receives requests from DataServer, actually interacts with Database through JDBC API.
Note: call sequence
RecipeDesigner -> MaterialDataManager(client) -> MaterialDataServer(server) -> MaterialTreeServer(server)
2.3.3), PLSQL packages
GMD_RECIPE_DESIGNER_PKG
3, Debugging
3.1, Client debug
Client debug focuses on RecipeDesigner.java, imply use System.out.println to do client debug, or use below method
to print call information.
private void printCall(String mtd, String[] na, String[] va) {
StringBuffer buf = new StringBuffer("Method: " + mtd +"t Params: ");
for(int i = 0; i < na.length; i++) {
buf.append(na[i]).append("=").append(va[i]).append(";");
}
System.out.println(buf.toString());
}
or use the following not-so-elegant code to get call trace:
try {
throw new Exception("for call trace");
} catch(Exception ex) {
ex.printStackTrace(System.out);
}
3.2, Server debug
For server debug, you can choose to write debug info in log files or database. I prefer the files choice. By adding
debug methods to CommonDataServer/CommonTreeServer, you can call them in their implementations. This is an
example for debug method:
4. private String file="/home/applmgr/rcpdsg.log";
protected void log(String msg, boolean trace) {
PrintWriter out = null;
try {
out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file,true))); // append
if(trace) {
try {
throw new Exception("for call trace");
} catch(Exception ex) {
ex.printStackTrace(out);
}
}
out.println(msg);
}catch(Exception ex) {
}finally
if(out !=null) {
try {
out.close();
} catch(Exception ex) {}
}
}
}
Make sure that you have write permission on the file you specify.
4, Setup
4.1), jdev setup
In dev desktop, use the following path:
For 121 branch, select 1213x5dbg
5. Note: you have to choose corresponding jdev version for your code version, or there will be some unexpected errors.
Or setup a jdev env on your testing box:
1), download patch p9879989_R12_GENERIC.zip, and unzip
2), under your home folder, edit .jdev_jdk, input jdk5’s path, for example: /usr/java/jdk1.5.0_22
3), start jdev
4.2), project setup
First copy code from arcs, take branch121 as an example,
chenv gmd GMD121 gmddev
cp -R $gmd/java/recipeDesigner/common $yourfolder
cp -R $gmd/java/recipeDesigner/server $yourfolder
cp -R $gmd/java/recipeDesigner/javaui $yourfolder
copy following fnd jars from your EBS instance:
fndaol.jar fndctx.jar fndforms.jar fndjewtall.jar fndsec.jar
fndaolj.jar fndewt.jar fndgantt.jar fndjewt.jar fndtcf.jar
fndbalishare.jar fndewtpv.jar fndhier.jar fndjle.jar
In jdev, create a user library to include all these jars, take my example as fnd-ext.
Set project libraries like:
4.3), deploy
First, create a new jar deploy profile, File -> New,
6. Deploy,
Should be fine like,
5, Testing
Server side
replace class file under $OA_JAVA/oracle/apps/gmd/recipeDesigner/server/, restart applications;
Client side
replace jar file under $OA_JAVA/oracle/apps/gmd/jar, clear all browser java cache(through java control panel ->
settings -> delete all files), better restart browser;
--EOF--