RepositoryBackedSession { boolean replicateOnGet(Object obj) { return replicateOnGet && !isImmutableType(obj); } RepositoryBackedSession(SessionData sessionData, SessionManager manager, SessionFactory factory); protected  RepositoryBackedSession(RepositoryBackedSession linked); void setMaxInactiveInterval(int maxInactiveInterval); Object getAttribute(String key); @SuppressWarnings({ "rawtypes" }) Enumeration getAttributeNames(); List<String> getAttributeNamesWithValues(); long getCreationTime(); String getId(); long getLastAccessedTime(); int getMaxInactiveInterval(); void invalidate(); void doInvalidate(boolean expired); boolean isNew(); void removeAttribute(String name); Attribute getAttributeFromCache(String name); void setAttribute(String key, Object value); synchronized void commit(); boolean isValid(); boolean isExpired(); boolean isDirty(); Runnable getCommitter(); SessionData getSessionData(); boolean isCommitted(); void setCommitted(boolean committed); SessionManager getSessionManager(); int getConcurrentUses();  }
@Test public void testReplication() { sessionConfiguration.setReplicationTrigger(ReplicationTrigger.SET); RepositoryBackedSession rbs = new RepositoryBackedSession(sessionData, manager, factory); assertFalse(rbs.replicateOnGet("String")); assertFalse(rbs.replicateOnGet(this)); sessionConfiguration.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET); rbs = new RepositoryBackedSession(sessionData, manager, factory); assertFalse(rbs.replicateOnGet("String")); assertTrue(rbs.replicateOnGet(this)); }