Re: [hibernate-dev] Integrator and retrieving objects

2011-04-27 Thread Steve Ebersole
Right, I don't think the "its stateless" approach will work as the general rule. On 04/27/2011 03:48 AM, Adam Warski wrote: > The AuditReader is stateful on the other hand - apart from the Session and > Envers config (which could be looked up each time), it contains a first-level > cache for a

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-27 Thread Adam Warski
The AuditReader is stateful on the other hand - apart from the Session and Envers config (which could be looked up each time), it contains a first-level cache for already resolved historical objects. Adam On Apr 26, 2011, at 8:04 PM, Emmanuel Bernard wrote: > To clarify, FullTextSession is sta

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-26 Thread Emmanuel Bernard
To clarify, FullTextSession is stateless besides holding a pointer to the Session(Implementor). so we would be fine by creating a new FullTextSession object every time as() is called. On 26 avr. 2011, at 19:47, Sanne Grinovero wrote: > 2011/4/26 Steve Ebersole : >> as(...) is on Session though.

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-26 Thread Sanne Grinovero
2011/4/26 Steve Ebersole : > as(...) is on Session though.  What I am talking about is what happens when > they *somehow* get a normal Session and call session.as( > FullTextSession.class ) ? > > e.g. > > fullTextSession.getSessionFactory() >        .openSession() >        .as( FullTextSession.clas

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-26 Thread Steve Ebersole
as(...) is on Session though. What I am talking about is what happens when they *somehow* get a normal Session and call session.as( FullTextSession.class ) ? e.g. fullTextSession.getSessionFactory() .openSession() .as( FullTextSession.class ); Now what? I guess this really

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-25 Thread Sanne Grinovero
2011/4/25 Steve Ebersole : > Just to circle back to this (because my memory is so short).. > > What did we ever decide about this, especially in regards to the *how*? > > As and example, lets look at Search.  Search wraps Session in a > FullTextSession.  Search would register some handler with the

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-25 Thread Adam Warski
On Apr 25, 2011, at 4:30 AM, Steve Ebersole wrote: > Just to circle back to this (because my memory is so short).. > > What did we ever decide about this, especially in regards to the *how*? > > As and example, lets look at Search. Search wraps Session in a > FullTextSession. Search would re

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-24 Thread Steve Ebersole
Just to circle back to this (because my memory is so short).. What did we ever decide about this, especially in regards to the *how*? As and example, lets look at Search. Search wraps Session in a FullTextSession. Search would register some handler with the SessionFactory that says it knows h

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Scott Marlow
I like it. I tried to do something generically in the AS7 JPA code to have a protected bag of such things at the container EntityManager level. Just keep in mind that AS will try to serialize the objects when clustering. See https://github.com/jbossas/jboss-as/blob/master/jpa/src/main/java/o

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Emmanuel Bernard
yes as is indeed better. On 6 avr. 2011, at 13:29, Steve Ebersole wrote: > A phrase I see a lot here is "as": > > session.as( AuditReader.class ).someEnversSpecificMethod() > > or > > session.as( FullTextSession.class )... > > > On 04/06/2011 06:26 AM, Adam Warski wrote: >> >> On Apr 6, 201

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Hardy Ferentschik
That looks indeed short and concise. --Hardy On Wed, 06 Apr 2011 13:29:44 +0200, Steve Ebersole wrote: > A phrase I see a lot here is "as": > > session.as( AuditReader.class ).someEnversSpecificMethod() > > or > > session.as( FullTextSession.class )... ___

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Adam Warski
On Apr 6, 2011, at 1:29 PM, Steve Ebersole wrote: > A phrase I see a lot here is "as": > > session.as( AuditReader.class ).someEnversSpecificMethod() > > or > > session.as( FullTextSession.class )... Sounds good. And in fact it's the AuditReader/FullTextSessions that could have unwrap method

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Steve Ebersole
A phrase I see a lot here is "as": session.as( AuditReader.class ).someEnversSpecificMethod() or session.as( FullTextSession.class )... On 04/06/2011 06:26 AM, Adam Warski wrote: > > On Apr 6, 2011, at 1:20 PM, Steve Ebersole wrote: > >> The phrase 'unwrap' might be a bit misleading there beca

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Adam Warski
On Apr 6, 2011, at 1:20 PM, Steve Ebersole wrote: > The phrase 'unwrap' might be a bit misleading there because you may not be > dealing with wrapped objects. But the idea itself is still solid I believe. > Think of it more as a multi-directional cast Right, the idea sounds good; so it would

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Steve Ebersole
The phrase 'unwrap' here might be a bit misleading because you may not always be dealing with wrapped objects. But the idea itself is still solid I believe. Think of it as a multi-directional cast; you can up-cast as well as down-cast. We do need to be very very very careful about stack overf

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-06 Thread Adam Warski
> FullTextSession ftSession = session.unwrap(FullTextSession.class); > //the current approach is via some static helper method > //FullTextSession ftSession = Search.getFullTextSession(session); > > That would mean that the integration point between HSearch and Hibernate > would have an unwrap

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-05 Thread Emmanuel Bernard
yes On 5 avr. 2011, at 13:42, Steve Ebersole wrote: > Well maybe I misunderstood. If you mean the Integrator impls pushing these > delegates then yeah I guess that makes sense. > > On Apr 5, 2011 6:09 AM, "Steve Ebersole" wrote: ___ hibernate-dev ma

Re: [hibernate-dev] Integrator and retrieving objects

2011-04-05 Thread Steve Ebersole
Well maybe I misunderstood. If you mean the Integrator impls pushing these delegates then yeah I guess that makes sense. On Apr 5, 2011 6:09 AM, "Steve Ebersole" wrote: ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/