public void storeSipSessionData( OutgoingDistributableSipSessionData sipSessionData) { String sipApplicationSessionKey = sipSessionData.getSipApplicationSessionKey(); String sessionKey = sipSessionData.getSipSessionKey(); if (log_.isDebugEnabled()) { log_.debug("storeSipSessionData(): putting sip session " + sessionKey.toString()); } Fqn<String> fqn = getSipSessionFqn(jBossCacheService.combinedPath_, sipApplicationSessionKey, sessionKey); // Swap in/out the webapp classloader so we can deserialize // attributes whose classes are only available to the webapp ClassLoader prevTCL = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(manager.getApplicationClassLoader()); try { storeSipSessionMetaData(fqn, sipSessionData); ((DistributedCacheConvergedSipManager)jBossCacheService).storeSipSessionAttributes(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY), sipSessionData); } finally { Thread.currentThread().setContextClassLoader(prevTCL); } }
public void storeSipSessionMetaData(Fqn<String> fqn, OutgoingDistributableSipSessionData sipSessionData) { DistributableSipSessionMetadata dsm = (DistributableSipSessionMetadata)sipSessionData.getMetadata(); if (dsm != null && sipSessionData.isSessionMetaDataDirty()) { Long timestamp = sipSessionData.getTimestamp(); if (timestamp != null) { if (log_.isDebugEnabled()) { jBossCacheService.cacheWrapper_.put(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.VERSION_KEY.toString()), AbstractJBossCacheService.VERSION_KEY.toString(), sipSessionData.getVersion());