/** * @param indent * @return */ public String jonasClusterToXml() { StringBuffer buff = new StringBuffer(); writeValue(clusterName, buff, "<name>", "</name>"); writeValue(policyType, buff, "<policy>", "</policy>"); writeValue(strategyType, buff, "<strategy>", "</strategy>"); writePoolToXml(buff, 2); return buff.toString(); }
throws CMIInfoExtractorException { org.ow2.cmi.info.mapping.Cluster clusteredObject = (org.ow2.cmi.info.mapping.Cluster) clusteredObj; String clusterName = clusteredObject.getClusterName(); if(clusterName == null || clusterName.equals("")) { clusterName = "defaultCluster"; boolean proxyEnabled = clusteredObject.isProxyEnabled(); String policyClassName = clusteredObject.getPolicyType(); Class<? extends IPolicy> policyClass = null; if(policyClassName != null && !policyClassName.equals("")) { String strategyClassName = clusteredObject.getStrategyType(); Class<? extends IStrategy> strategyClass = null; if(strategyClassName != null && !strategyClassName.equals("")) { IPoolConfiguration poolConfiguration = clusteredObject.getPoolConfiguration(); PropertiesInfo propertiesInfo = clusteredObject.getPropertiesInfo(); Map<String, Object> policyProperties = null; if(propertiesInfo != null) {
/** * @param buff * the String buffer to write in. * @param indent * the ident value. */ private void writePoolToXml(final StringBuffer buff, final int indent) { // TODO Auto-generated method stub buff.append(indent); if (poolConfiguration != null) { writeValue(new Integer(poolConfiguration.getMax()).toString(), buff, "<max-size>", "</max-size>"); writeValue(new Integer(poolConfiguration.getMaxWaiters()) .toString(), buff, "<max-waiters>", "</max-waiters>"); writeValue(new Long(poolConfiguration.getTimeout()).toString(), buff, "<timeout>", "</timeout>"); } }
if(clusteredObj.getObjectName() == null || clusteredObj.getObjectName().equals(objectName)) { clusteredObject = clusteredObj; break;