Jim -- OJB supports the use of stored procedures to handle all persistence operations (insert, update and delete). The stored procedures that are configured in the repository are used in place of standard insert, update and delete SQL commands. You do not need to use any sort of database triggers in order to take advantage of OJB's use of stored procedures for persistence operations.
The example that you refer in the documentation to was culled from an application that I was one of the lead architects on. In the environment that that application was to be deployed in, the DBAs insisted that all persistence operations be performed by stored procedures. This was accomplished by utilizing OJB's support for stored procedures. In that same environment, the business community insisted that we track who created and performed the last update on each record. That requirement was accomplished via the insert/update triggers that are referenced in the sample. The final feature was the requirement that any updates to the four audit columns be reflected in the java objects that were managed by the application. This requirement was accomplished in two steps: (1) the stored procedures that OJB utilized returned these values to the caller (i.e. OJB) via the "RETURNING" clause and (2) the configuration of the stored procedure in the repository file included the attri bute 'return="true"' attribute on any arguments that were returned to OJB. I hope this helps you out. Let me know if I can clarify things any further. Ron Gallagher > > From: "Wright, Jim \(NIH/CIT\) [C]" <[EMAIL PROTECTED]> > Date: 2006/08/08 Tue PM 04:57:32 EDT > To: <[email protected]> > Subject: Methods of calling stored procedures in OJB > > Does one have to use database triggers in order to run stored procedures > in OJB? The Apache documentation seems to imply that: > > > > http://db.apache.org/ojb/docu/howtos/howto-work-with-stored-procedures.h > tml#A+simple+example > > > > I need a way to run them that does not involve triggers. > > Jim Wright > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
