I'm trying to extend JBoss Portal, which uses Hibernate3 to manage its user profile information in an RDBMS, to persist some of its user fields to a Siebel CRM instance instead of the database. Unfortunately, while JBP separates its user management API into a separate module, the API for this interface assumes a session-based transaction model, e.g. there's no explicit "Save" operation.
So, in trying to avoid rewriting the JBP user management components altogether, I'm considering using Hibernate events to extend the existing persistence model. E.g. populate the extra Siebel fields in an onLoad handler (using the Siebel business apis), report changes to these fields inonDirtyCheck, save changed Siebel fields in onPostUpdate, etc. I'm aware of the N+1 implications for lists of user objects, but most of the time we're only dealing with a single user at a time (and we expect to have lots of users, so I may disable the multi-user stuff altogether)
Is this nuts? Novel? Are there particular issues I should consider (transactionality, errors, whatever)?
I'd appreciate any insight the community can provide.
thanks,
Peter
|