tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AndyG <>
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.



View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message