Home Documentum

override doSave() of an xCP type

For Audit I need to get the full java stack trace when any client saves a modified xCP object. In classic Documentum I would create a TBO with the doSave() method.
xCP has the Business Event "<typename> Updated", but it fires on pre-commit which is too late and I can't determine the caller of save().

I managed to add a default non-xCP aspect to the xCP type, but it breaks further deployments when xDA is in production mode: Unable to remove default aspect 'audit' from type tst_testsave

Comments

  • "... but it fires on pre-commit which is too late and I can't determine the caller of save()"

    - What are you trying to capture?  We are able to read the user associated with the session when we updated business event is triggered.
  • I was able to replace an xCP Type Fragment with my aspect using Composer.
    Therefore I was able to add a TBO into an xCP type.

    This approach doesn't break subsequent deploys, becase xCP will not try to undo our changes to the Type Fragment.
    Initially, for a Type Fragment xCP creates an aspect with the primary class com.emc.xcp.runtime.aspect.impl.DefaultAspect and puts defaultaspect.jar into the aspect dm_folder.
    With the help of Composer I managed to upload my custom implementation jar into this folder and to replace the primary class with mine that overrides doSave().

    DCTM_Guru said:
    - What are you trying to capture?
    I need the java stack trace that calls save().


  • Glad to hear that you found a solution.  Kind of extreme that you have dump stack trace for auditing purposes.  Audit management built into Content Server is very robust.  Sometimes its too robust; we actually create version object that copies the attribute values of "parent" object to version object any time xcp object is modified (as well as version the version object).
Sign In or Register to comment.