subscriptionData.setCommitsEnabled(cartridgeInfoBean.isCommitsEnabled());
subscriptionData.setServiceGroup(cartridgeInfoBean.getServiceGroup());
if (cartridgeInfoBean.isPersistanceRequired()) {
// Add persistence related properties to PersistenceContext
PersistenceContext persistenceContext = new PersistenceContext();
persistenceContext.setPersistanceRequiredProperty(IS_VOLUME_REQUIRED, String.valueOf(cartridgeInfoBean.isPersistanceRequired()));
persistenceContext.setSizeProperty(VOLUME_SIZE, cartridgeInfoBean.getSize());
persistenceContext.setDeleteOnTerminationProperty(SHOULD_DELETE_VOLUME, String.valueOf(cartridgeInfoBean.isRemoveOnTermination()));
subscriptionData.setPersistanceCtxt(persistenceContext);
}
//subscribe
return cartridgeSubsciptionManager.subscribeToCartridgeWithProperties(subscriptionData);