userName = session.getPrincipal().getName();
((BaseHASession)session).setUserName(userName);
}
byte[] sessionState = this.getByteArray(session, isReplicationCompressionEnabled());
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);
}
//need this here because save not called
simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
try {
transmitState = jxtaReplicator.getSimpleTransmitState(session.getIdInternal(), simpleMetadata);
} catch (BackingStoreException ex) {}
return transmitState;
}