Hi,
We have a requirement to audit all the create, update, delete actions done by the user. Is there any way to do this centrally for all datasources (I am using the sql connector) and have the query written to an audit table?
thanks
Hi,
We have a requirement to audit all the create, update, delete actions done by the user. Is there any way to do this centrally for all datasources (I am using the sql connector) and have the query written to an audit table?
thanks
You can do things centrally for all DataSources by either creating a Custom DataSource that is a subclass of whatever built-in DataSource you’re using (eg a subclass of SQLDataSource) and then using that custom subclass pervasively, or, you can subclass IDACall and add logic in the midst of the RPCManager calls to getRequests() and process them.
audit table ds.xml
Hi Isomorphic,
So if I override the handleDSRequest method of IDACall, can I instantiate a datasource on the server in the same manner that I would on the client so that I could save a new row in the table?
DataSource ds = new DataSource.get("AuditTable")
Assuming there is an AuditTable.ds.xml in the war/ds folder.
To get the DataSource for a request, use dsRequest.getDataSource().
We have added a new API, RPCManager.getDataSource(String dsName). This method will return a DataSource instance to your code, and ensure that the instance is returned back to the pool at the end of the request cycle (server-side, all DataSource objects are pooled).
This new API will be present in nightly eval builds from tomorrow; you can grab the latest nightly build here
Smartgwt
Great, where can I get the jar files for smartgwt? (the link was for smartclient)
No, the link is for both (try it).