The code looks like this
DetachedCriteria crit1 = DetachedCriteria.forEntityName("CommentBean");
Criteria crit = crit1.getExecutableCriteria(session);
session is a thread local variable.
if I change strategy to using HQL or regular criteria everything works it's just detached criteria that don't work.
one other thing the detached Criteria is being created in web teir and passed to ejb layer