Java Concurrent Program
10 Январь 2012
1 комментарий

Как создать Java Concurrent Program:
- Создать директорию $FND_TOP/java/cp/request (желательное, но не обязательное место)
- Скопировать java класс
- Скомпилировать java класс
- Регистрируем Concurrent Program Executable
- Метод выполнения: Параллельная программа JAVA
- Имя исполняемого файла указываем без формата файла
- Регистрируем Concurrent Program
- Поле формат = Текст
- Для параметров заполняем также идентификаторы (token)
Шаблон java класса
================= Template.java===========================
package oracle.apps.fnd.cp.request;
// Change the package name to the required one.
// import all the other required classes/packages.
import oracle.apps.fnd.util.*;
import oracle.apps.fnd.cp.request.*;
// Change the name of the class from Template to your concurrent program
// class name
public class Template implements JavaConcurrentProgram
{
/** Optionally provide class constructor without any arguments.
* If you provide any arguments to the class constructor then while
* running the program will fail.
*/
public void runProgram(CpContext pCpContext)
{
ReqCompletion lRC = pCpContext.getReqCompletion();
String CompletionText = "";
/* Code your program logic here.
* Use getJDBCConnection method to get the connection object for any
* JDBC operations.
* Use CpContext provided commit,rollback methods to commit/rollback
* data base transactions.
* Don't forget to release the connection before returning from this
* method.
*/
/* Call setCompletion method to set the request completion status and
* completion text.
* Status values are ReqCompletion.NORMAL,ReqCompletion.WARNING,
* ReqCompletion.ERROR.
* Use Completion text message of length 240 characters. If it is more
* than 240 then full string will appear in log file and truncated 240
* characters will be used as request completion text.
*/
lRC.setCompletion(ReqCompletion.NORMAL, CompletionText);
}
}
==================End of Template.java===========================

Последние комментарии