Open GoogleCodeExporter opened 8 years ago
Sorry, it's inside intercept() not inject().
Original comment by dnie...@gmail.com
on 5 Nov 2010 at 6:12
Also, inside the implementation of detect*CreatedLater, the action will never
be executed because isCandidadeClass() blacklist the value.
For example, in detectAndCloseHibernateCoreSessionCreatedLater, the block which
closes the session is unreachable because fieldValue's class (SessionImpl) is
being passed to isCandidadeClass which blacklists org.hibernate package.
for (Field campo : campos) {
if (campo.isEnumConstant())
continue;
// test for "singletons"
campo.setAccessible(true);
Object fieldValue = campo.get(targetObject);
if ((fieldValue==null) || !isCandidadeClass(fieldValue.getClass()))
continue;
...
if (campo.getType().getName().equals(Session.class.getName())) {
if (campo.isAnnotationPresent(SessionTarget.class)) {
campo.setAccessible(true);
Session hibernateSession = (Session) campo.get(targetObject);
closeHibernateSession(hibernateSession);
}
}
...
}
Original comment by dnie...@gmail.com
on 5 Nov 2010 at 6:28
Original issue reported on code.google.com by
dnie...@gmail.com
on 5 Nov 2010 at 6:00