Calling Oracle BugDB PL/SQL Package Procedures from Application Modules
Hi Experts,
I am using JDev 11g R2.My requirement is as follows:
1.Create a public database link to remote bugDB using the Testing Environment.(Done)
2.Access the data from local database to BugDB using that DB link (Done)
3.Insert/Create a bug using the Create_Bug procedure in the API provided by BugDB(Failed).In the Application ModuleImpl class I have added the following code(Just an Example) to call the API containing a pl/sql procedure which creates a bug in the remote db table.
public void Create_Bug(String Product, String Component, String Subcomponent, String Status) {
CallableStatement st = null ;
try {
StringBuffer str = new StringBuffer();
str.append(" BEGIN ");
str.append(" Bug.Bug_API_V1.Create_Bug@bugtest( ");
str.append(" Product => :1, ");
str.append(" Component => :2, ");
str.append(" BugNo => :3 ");
str.append(" Status => :4 ");
str.append(" ")
str.append(" ); ");
str.append(" END; ");
st =getDBTransaction().createCallableStatement(str.toString(), 1);
st.setString(1, Product);
st.setString(2, Component);
st.setString(3, Subcomponent);
st.setString(4, Status);
st.execute();
} catch (SQLException sqle) {
// TODO: Add catch code
sqle.printStackTrace();
} catch (NumberFormatException nfe) {
// TODO: Add catch code
nfe.printStackTrace();
}
}
4.Added a managed bean to invoke this AppModuleDataControl which stores the value in the remote database.(Failed in this part).
Its not showing any errors in the log but the bug is not created either in the remote database.Could anyone guide me where am I going wrong or what is the better way to handle this requirement.Any suggestion for materials,links or tutorials would be highly appreciated.Thanks in advance.
Regards,
Prasanna