tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AndyG <andy.gumbre...@orprovision.com>
Subject Re: Could not locate SessionFactory in JNDI
Date Tue, 29 Nov 2011 07:45:49 GMT
Sure, nothing like portable. But I hope the user understands that getting
hold of anything below the interfaces is 'never' portable. Getting hold of
hibernate is however quite useful in order to utilize non spec features, if
it is available - The same goes for any other provider, as they all have
their special tweaks.

I use this for example in a class loaded implementation within my own
application that has an implementation for OpenEJB and JBoss (I know I will
never go outside of these, but if I do then it is just one extra class).
Testing for library availability through class loading is easy enough. My
sole use for this is to test for entity collection sizes without loading -
Very useful. There is the hibernate specific
'@LazyCollection(LazyCollectionOption.EXTRA)' annotation, but this would
pollute the entity layer with non portable code, and that is a lot more work
to look after.

Regards,

Andy

--
View this message in context: http://openejb.979440.n4.nabble.com/Could-not-locate-SessionFactory-in-JNDI-tp4113852p4118313.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message