((BaseHASession)session).setUserName(userName);
}
byte[] sessionState = this.getByteArray(session, isReplicationCompressionEnabled());
ReplicationManagerBase mgr
= (ReplicationManagerBase)this.getManager();
BackingStore replicator = mgr.getBackingStore();
if(_logger.isLoggable(Level.FINE)) {
_logger.fine("ReplicationStore>>doValveSave replicator: " + replicator);
_logger.fine("ReplicationStore>>doValveSave version:" + session.getVersion());
}
SimpleMetadata simpleMetadata =
SimpleMetadataFactory.createSimpleMetadata(session.getVersion(), //version
((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
session.getMaxInactiveInterval(), //maxinactiveinterval
sessionState, //state
((HASession)session).getExtraParameters()); //containerExtraParam
String beKey = session.getBeKey();
if(beKey != null) {
simpleMetadata.setBeKey(beKey);
}
try {
HASession haSess = (HASession)session;
replicator.save(session.getIdInternal(), //id
simpleMetadata, haSess.isPersistent()); //TODO: Revist the last param
} catch (BackingStoreException ex) {
IOException ex1 =
(IOException) new IOException("Error during save: " + ex.getMessage()).initCause(ex);
throw ex1;