/** * Check whether the state store in the specified <code>messageContext</code> can be replicated. * Also note that if there are no members, we need not do any replication * * @param messageContext The MessageContext to be subjected to this test * @return true - State needs to be replicated * false - otherwise */ private static boolean canReplicate(MessageContext messageContext) { ClusteringAgent clusteringAgent = messageContext.getRootContext().getAxisConfiguration().getClusteringAgent(); return clusteringAgent != null && clusteringAgent.getStateManager() != null; } }
/** * Check whether the state store in the specified <code>messageContext</code> can be replicated. * Also note that if there are no members, we need not do any replication * * @param messageContext The MessageContext to be subjected to this test * @return true - State needs to be replicated * false - otherwise */ private static boolean canReplicate(MessageContext messageContext) { ClusteringAgent clusteringAgent = messageContext.getRootContext().getAxisConfiguration().getClusteringAgent(); return clusteringAgent != null && clusteringAgent.getStateManager() != null; } }
String key = null; File file = null; LifecycleManager lcm = (LifecycleManager)msgContext.getRootContext().getAxisConfiguration().getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER); DataSource dataSource = null; for (int i = 0; i < keys.size(); i++) {
String key = null; File file = null; LifecycleManager lcm = (LifecycleManager)msgContext.getRootContext().getAxisConfiguration().getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER); DataSource dataSource = null; for (int i = 0; i < keys.size(); i++) {
public static Attachments createAttachments(MessageContext msgContext, InputStream inStream, String contentTypeString, boolean fileCacheForAttachments, String attachmentRepoDir, String attachmentSizeThreshold, int contentLength) { LifecycleManager manager = null; try { AxisConfiguration configuration = msgContext.getRootContext().getAxisConfiguration(); manager = (LifecycleManager)configuration .getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER); if (manager == null) { manager = new LifecycleManagerImpl(); configuration.addParameter(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER, manager); } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Exception getting Attachments LifecycleManager", e); } } return new Attachments(manager, inStream, contentTypeString, fileCacheForAttachments, attachmentRepoDir, attachmentSizeThreshold, contentLength); }
public static Attachments createAttachments(MessageContext msgContext, InputStream inStream, String contentTypeString, boolean fileCacheForAttachments, String attachmentRepoDir, String attachmentSizeThreshold, int contentLength) { LifecycleManager manager = null; try { AxisConfiguration configuration = msgContext.getRootContext().getAxisConfiguration(); manager = (LifecycleManager)configuration .getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER); if (manager == null) { manager = new LifecycleManagerImpl(); configuration.addParameter(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER, manager); } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Exception getting Attachments LifecycleManager", e); } } return new Attachments(manager, inStream, contentTypeString, fileCacheForAttachments, attachmentRepoDir, attachmentSizeThreshold, contentLength); }
try { Replicator.replicateState(cacheReplicationCommand, msgCtx.getRootContext().getAxisConfiguration()); } catch (ClusteringFault clusteringFault) { log.error("Cannot replicate cache changes");