[Mulgara-dev] adding ResolverFactoryInitializer.getSessionFactory()

Andrae Muys andrae at netymon.com
Mon May 19 00:46:03 UTC 2008


On 18/05/2008, at 3:26 PM, Life is hard, and then you die wrote:
>
> We have a resolver that works a bit like a trigger, and it (sometimes)
> needs a separate Session (from whatever the "current" session is) to
> run a query on. So far this has been using a bit of hack to get the
> SessionFactory (namely by assuming LocalSessionFactory was being used
> and exploiting the fact that the underlying SessionFactory is shared
> between all LocalSessionFactory instances). However, this hack fails
> now that we've switched to RMI, and it also fails for our embedded
> mulgara usage where we don't use LocalSessionFactory either.
>
> There's currently no way (that I can see) for a resolver to get a
> handle on the "current" SessionFactory (the one it belongs to); so I'm
> thinking of adding a getSessionFactory() to the
> ResolverFactoryInitializer to get that functionality - does anybody
> have any reservations or reasons not to do this? Or any better
> suggestions?

I have serious reservations regarding the correctness of such an  
operation.  The reason a resolver can't obtain a new session like  
this is that, to the best of my knowledge, such a session cannot be  
used without violating ACID guarantees.  I would be very interested  
in knowing why you feel you need this.

Andrae

-- 
Andrae Muys
andrae at netymon.com
Senior RDF/Semantic-Web Consultant
Netymon Pty Ltd






More information about the Mulgara-dev mailing list