Re: [Hibernate] Hibernate aspects

2004-09-25 Thread Gavin King
Bill Burke wrote: I'm not sure about these, just writing what comes into my head: * setting FlushMode * session disconnect/reconnect * enabling filters in HB3 Hi all, I'm trying to brainstorm a list of aspects for Hibernate that could be written with JBoss AOP. The first one I can think of is: *

Re: [Fwd: Re: [Hibernate] Hibernate aspects]

2004-09-22 Thread Igor Fedorenko
Steve Ebersole wrote: As long as both of the sessions are on the same underlying Connection this should be achievable. Otherwise you'd run into txn isolation issues. In XA I can have many physical DB connections all running in the same tx context. Using the current HibernateContext code as an e

RE: [Fwd: Re: [Hibernate] Hibernate aspects]

2004-09-22 Thread Steve Ebersole
:41 PM To: Bill Burke Cc: hibernate list Subject: Re: [Fwd: Re: [Hibernate] Hibernate aspects] Basically, I need to flush the session if * I am calling into code that will open another hibernate session. This will be the case if I call a remote object, but may happen with local invocation too,

RE: [Hibernate] Hibernate aspects

2004-09-22 Thread Steve Ebersole
P.S., the current HibernateContext could be leveraged to perform this (this is exactly what it does through a TransactionLocal). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Burke Sent: Tuesday, September 21, 2004 3:32 PM To: hibernate list Subject

Re: [Fwd: Re: [Hibernate] Hibernate aspects]

2004-09-22 Thread Igor Fedorenko
Basically, I need to flush the session if * I am calling into code that will open another hibernate session. This will be the case if I call a remote object, but may happen with local invocation too, if for example, target EJB runs under different security role. * I am calling into code that use

Re: [Fwd: Re: [Hibernate] Hibernate aspects]

2004-09-22 Thread Bill Burke
Igor Fedorenko wrote: What about session flushing? Say I am writing an EJB that writes something to the database through Hibernate and then calls another remote EJB. What would be the semantics? You would also need the ability to associate a Session with a thread as well to get this automatic f

Re: [Hibernate] Hibernate aspects

2004-09-22 Thread Max Rydahl Andersen
Bill Burke wrote: Hi all, I'm trying to brainstorm a list of aspects for Hibernate that could be written with JBoss AOP. The first one I can think of is: * Session injection. public class AccountDAO { public @Injected(name="Sessionname") Session session; } A simple/basic one that just pops up i