*/
public class DefaultEMLocator implements EntityManagerLocator {
public EntityManager locate() {
final ThreadLocal<BpelDAOConnectionImpl> currentConnection = BpelDAOConnectionImpl.getThreadLocal();
BpelDAOConnectionImpl bpelDAOConnection = currentConnection.get();
if(null==bpelDAOConnection)
throw new IllegalStateException("Unabled to locate BpelDAOConnectionImpl from ThreadLocal");
return bpelDAOConnection.getEntityManager();
}