2

我试图从 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;

}
}
4

1 回答 1

0

代替

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

我试过了

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

和工作。它可能会帮助某人。

于 2014-02-10T03:50:57.047 回答