[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
Trying to drop in the Audit function, here's what I did: | Added the lib to my classpath | Changed my entity to inherit from AuditHome instead of Entity Home | Added @Auditable annotation to the field I want to track | | When I deploy the application and try to access the class that

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
Ok, it helps if you bind the auditHomeEntityManager, I did that and got past the initial error. Now when I try to edit the entity that is marked @Auditable I get this error on update: 17:53:35,633 FATAL [application] java.lang.IllegalArgumentException: Unknown entity:

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-15 Thread griffitm
I created the required tables and still get the same error, has anyone been able to successfully get this example to work in an application? Any help would be much appreciated. Cheers! MG View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4095434#4095434 Reply to

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-10-12 Thread JakeC
I am trying to create an Audit record using Hibernate Interceptors, but I'm having trouble figuring out how to configure it within Seam. In order to get the userId into the Audit record, I need to create a new Interceptor per Session, passing in the userId via the Interceptor's constructor.

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-08-16 Thread apushadow
Heya Pete-- I'm trying to use your solution (from here http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamAuditHome)... I copied the orm.xml into my project and annotated a bunch of stuff in my User object as @Auditable. When I start up my app server (OC4J), the auditlog and auditlogdetail tables

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-08-16 Thread [EMAIL PROTECTED]
For this to work you must use EntityHomes to manipulate your objects. On reflection I think using Hibernate Interceptors is probably a better plan always. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074905#4074905 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2007-08-10 Thread awhitford
So in the end, how did you do this Kevin? Did you use Pete's strategy, or end up using Hibernate Interceptors? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073228#4073228 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-12-13 Thread kevin.genie
Thanks very much Gavin, for spending time in explaining that. For the auditing part, I am now trying to do it thru Hibernate SessionFactory level Interceptor. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3993389#3993389 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-12-10 Thread [EMAIL PROTECTED]
kevin.genie wrote : Hello Gavin, | (The reason is that fine-grained method-level tx demarcation is an antipattern - you want to do all your work for a request in the same tx.) | | I didn't understand what you have said ? Can u pls give a detailed explanation ? Are you referrring to the

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-12-06 Thread kevin.genie
Thanks very much. I was on vacation. I am going to work on it today itself. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3991568#3991568 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3991568

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-12-01 Thread petemuir
Back to the original topic of audit logging. Here is my code. I'm pretty sure there are bugs in the logging code (especially in the list comparison) so if you spot stuff please let me know. http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamAuditHome View the original post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-30 Thread [EMAIL PROTECTED]
This stuff is meant to be used with Seam-managed tx/pc. If you wanted to use it with container-managed PC/tx, you could do it, but you would need to inject the EntityHome into a session bean component that does tx demarcation. View the original post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-30 Thread kevin.genie
Hello, I was just reading through the EntityHome Manager pattern and it seems that for that to work I have to use SeamManagedPersistenceContext. In my application we are not using SeamManagerPersistenceContext and are relying on EJB container for Tx demarcation. In this case, what will be the

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-30 Thread [EMAIL PROTECTED]
(The reason is that fine-grained method-level tx demarcation is an antipattern - you want to do all your work for a request in the same tx.) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3990349#3990349 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-29 Thread petemuir
I implemented something similar to the audit log code on the hibernate website. It's an extension to EntityHome, and will scan over the entity being saved, logging new values (and old values if changed and an update is occuring) if the property is marked @Auditable. It will follow

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-29 Thread cwash
I'm interested in this type of functionality, too. In the past I've used a Hibernate Interceptor and had an extension to my base model object that encapsulated the fields I wanted audited. I was able to do a type check in the interceptor code and persist the encapsulated audit log entries

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-29 Thread kevin.genie
Hello, Can u pls post ur code ? Again, how will i persist the audit data from the interceptor / listener ? (i.e how do i get a entitymanager for that ? look up the entitymanager factory and get the em ?) Thanx Kevin View the original post :

[jboss-user] [JBoss Seam] - Re: Audit Interceptor with State

2006-11-29 Thread petemuir
Well I didn't do this through an interceptor/listener, but via an extension of EntityHome from the Seam Framework. I just override the persist, update, remove methods in EnitityHome, call my audit logger, and then continue as normal. So, the only extra thing you need is a separate