找不到符号符号:方法getDBTransaction()

时间:2013-03-22 06:18:26

标签: oracle oracle-apps oracleapplications

我试图从OA Framework调用并发程序。这是代码。但是我收到了以下错误:

错误::

cannot find symbol symbol : method getDBTransaction() location: class _myclass OADBTransaction tx = (OADBTransaction)getDBTransaction();

以下是方法:

public int submitCPRequest(String headerId) {

try {

OADBTransaction tx = (OADBTransaction)getOADBTransaction();
java.sql.Connection pConncection = tx.getJdbcConnection();
ConcurrentRequest cr = new ConcurrentRequest(pConncection);

String applnName = "PO"; //Application that contains the concurrent program
String cpName = "XXMY Concurrent program name "; //Concurrent program name
String cpDesc = "Concurrent Program Description"; // concurrent Program description

// Pass the Arguments using vector
// Here i have added my parameter headerId to the vector and passed the vector to the concurrent program

Vector cpArgs = new Vector();
cpArgs.addElement(headerId);
// Calling the Concurrent Program

int requestId = cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
tx.commit();

return requestId;

} catch (RequestSubmissionException e) {
OAException oe = new OAException(e.getMessage());
//oe.setApplicationModule(this);
throw oe;

}
}

1 个答案:

答案 0 :(得分:0)

而不是

OADBTransaction tx = (OADBTransaction)getOADBTransaction();
java.sql.Connection pConncection = tx.getJdbcConnection(); 

我试过了

OracleConnection pConncection = null;
pConncection = (OracleConnection)TransactionScope.getConnection();

并且工作了。它可能对某人有帮助。