Revision 49289293
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java | ||
---|---|---|
54 | 54 |
import org.hibernate.engine.spi.SessionImplementor; |
55 | 55 |
import org.hibernate.engine.spi.Status; |
56 | 56 |
import org.hibernate.engine.spi.TypedValue; |
57 |
import org.hibernate.internal.CoreLogging; |
|
58 |
import org.hibernate.internal.CoreMessageLogger; |
|
57 | 59 |
import org.hibernate.internal.SessionFactoryRegistry; |
58 | 60 |
import org.hibernate.internal.util.MarkerObject; |
59 | 61 |
import org.hibernate.internal.util.collections.EmptyIterator; |
... | ... | |
87 | 89 |
* @author Cherian Mathew |
88 | 90 |
*/ |
89 | 91 |
public abstract class AbstractPersistentCollection implements Serializable, PersistentCollection { |
90 |
private static final Logger log = Logger.getLogger( AbstractPersistentCollection.class );
|
|
92 |
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( AbstractPersistentCollection.class );
|
|
91 | 93 |
|
92 | 94 |
/** |
93 | 95 |
* <b>IMPORTANT:</b><br> |
... | ... | |
198 | 200 |
// In remoting we are sure that session is null |
199 | 201 |
// both when using property paths and switching off conversations |
200 | 202 |
if(session == null && remoting) { |
201 |
log.info("--> readSize, of " + getRole() + " with key " + getKey());
|
|
203 |
LOG.info("--> readSize, of " + getRole() + " with key " + getKey());
|
|
202 | 204 |
read(); |
203 | 205 |
} else { |
204 | 206 |
boolean isExtraLazy = withTemporarySessionIfNeeded( |
... | ... | |
321 | 323 |
( (Session) session ).close(); |
322 | 324 |
} |
323 | 325 |
catch (Exception e) { |
324 |
log.warn( "Unable to close temporary session used to load lazy collection associated to no session" );
|
|
326 |
LOG.warn( "Unable to close temporary session used to load lazy collection associated to no session" );
|
|
325 | 327 |
} |
326 | 328 |
session = originalSession; |
327 | 329 |
} |
... | ... | |
343 | 345 |
// In remoting we are sure that session is null |
344 | 346 |
// both when using property paths and switching off conversations |
345 | 347 |
if(session == null && remoting) { |
346 |
log.info("--> readIndexExistence, of " + getRole() + " with key " + getKey());
|
|
348 |
LOG.info("--> readIndexExistence, of " + getRole() + " with key " + getKey());
|
|
347 | 349 |
read(); |
348 | 350 |
} else { |
349 | 351 |
Boolean extraLazyExistenceCheck = withTemporarySessionIfNeeded( |
... | ... | |
378 | 380 |
// In remoting we are sure that session is null |
379 | 381 |
// both when using property paths and switching off conversations |
380 | 382 |
if(session == null && remoting) { |
381 |
log.info("--> readElementExistence, of " + getRole() + " with key " + getKey());
|
|
383 |
LOG.info("--> readElementExistence, of " + getRole() + " with key " + getKey());
|
|
382 | 384 |
read(); |
383 | 385 |
|
384 | 386 |
} else { |
... | ... | |
416 | 418 |
// In remoting we are sure that session is null |
417 | 419 |
// both when using property paths and switching off conversations |
418 | 420 |
if(session == null && remoting) { |
419 |
log.info("--> readElementByIndex, of " + getRole() + " with key " + getKey());
|
|
421 |
LOG.info("--> readElementByIndex, of " + getRole() + " with key " + getKey());
|
|
420 | 422 |
read(); |
421 | 423 |
|
422 | 424 |
} else { |
... | ... | |
1366 | 1368 |
try { |
1367 | 1369 |
String role = getRole(); |
1368 | 1370 |
String fieldName = role.substring(role.lastIndexOf(".") + 1); |
1369 |
log.info("--> Remote Lazy Initializing Collection " + getRole() + " , owner : " + getOwner().getClass() + "/" + getKey() + " , field : " + fieldName);
|
|
1371 |
LOG.info("--> Remote Lazy Initializing Collection " + getRole() + " , owner : " + getOwner().getClass() + "/" + getKey() + " , field : " + fieldName);
|
|
1370 | 1372 |
Object owner = getOwner(); |
1371 | 1373 |
CdmBase cdmBase; |
1372 | 1374 |
if(owner instanceof CdmBase) { |
Also available in: Unified diff
ref #9204 change logger in AbstractPersistentCollection