@Override public Object run(Server param) throws PropertyVetoException, TransactionFailure { ResourceRef newResourceRef = param.createChild(ResourceRef.class); newResourceRef.setEnabled(enabled); newResourceRef.setRef(refName); param.getResourceRef().add(newResourceRef); return newResourceRef; } }, server);
public Object run(Server param) throws PropertyVetoException, TransactionFailure { ResourceRef newResourceRef = param.createChild(ResourceRef.class); newResourceRef.setEnabled(enabled); newResourceRef.setRef(refName); param.getResourceRef().add(newResourceRef); return newResourceRef; } }, server);
private void changeSystemProperty(List<SystemProperty> sps, String name, String port) throws PropertyVetoException, TransactionFailure { for (SystemProperty sp : sps) { if (name.equals(sp.getName())) { sp.setValue(port); return; } } // does not exist -- let's add one! SystemProperty sp = newServer.createChild(SystemProperty.class); sp.setName(name); sp.setValue(port); sps.add(sp); }
private void changeSystemProperty(List<SystemProperty> sps, String name, String port) throws PropertyVetoException, TransactionFailure { for (SystemProperty sp : sps) { if (name.equals(sp.getName())) { sp.setValue(port); return; } } // does not exist -- let's add one! SystemProperty sp = newServer.createChild(SystemProperty.class); sp.setName(name); sp.setValue(port); sps.add(sp); }
private void setSystemProperty(String name, String value) throws TransactionFailure, PropertyVetoException { SystemProperty sp = _server.getSystemProperty(name); if (sp == null) { SystemProperty newSP = _server.createChild(SystemProperty.class); newSP.setName(name); newSP.setValue(value); _server.getSystemProperty().add(newSP); } else { //Don't change the system property if it already exists - leave the original port assignment //sp.setName(name); //sp.setValue(value); } }
private void setSystemProperty(String name, String value) throws TransactionFailure, PropertyVetoException { SystemProperty sp = _server.getSystemProperty(name); if (sp == null) { SystemProperty newSP = _server.createChild(SystemProperty.class); newSP.setName(name); newSP.setValue(value); _server.getSystemProperty().add(newSP); } else { //Don't change the system property if it already exists - leave the original port assignment //sp.setName(name); //sp.setValue(value); } }
final String propName = (String) entry.getKey(); final String propValue = (String) entry.getValue(); SystemProperty newSP = newServer.createChild(SystemProperty.class);
final String propName = (String) entry.getKey(); final String propValue = (String) entry.getValue(); SystemProperty newSP = newServer.createChild(SystemProperty.class);
Server s = (Server) proxies[1]; List<ApplicationRef> arefs = s.getApplicationRef(); ApplicationRef aref = s.createChild(ApplicationRef.class); aref.setRef(app.getName()); aref.setEnabled(Boolean.TRUE.toString());
private void addClusterRefs(Cluster cluster, Server instance) throws TransactionFailure, PropertyVetoException { if (cluster != null) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (instance.getApplicationRef(appRef.getRef()) == null) { ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(appRef.getRef()); newAppRef.setDisableTimeoutInMinutes(appRef.getDisableTimeoutInMinutes()); newAppRef.setEnabled(appRef.getEnabled()); newAppRef.setLbEnabled(appRef.getLbEnabled()); newAppRef.setVirtualServers(appRef.getVirtualServers()); instance.getApplicationRef().add(newAppRef); } } for (ResourceRef rr : cluster.getResourceRef()) { if (instance.getResourceRef(rr.getRef()) == null) { ResourceRef newRR = instance.createChild(ResourceRef.class); newRR.setRef(rr.getRef()); newRR.setEnabled(rr.getEnabled()); instance.getResourceRef().add(newRR); } } } } }
private void addClusterRefs(Cluster cluster, Server instance) throws TransactionFailure, PropertyVetoException { if (cluster != null) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (instance.getApplicationRef(appRef.getRef()) == null) { ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(appRef.getRef()); newAppRef.setDisableTimeoutInMinutes(appRef.getDisableTimeoutInMinutes()); newAppRef.setEnabled(appRef.getEnabled()); newAppRef.setLbEnabled(appRef.getLbEnabled()); newAppRef.setVirtualServers(appRef.getVirtualServers()); instance.getApplicationRef().add(newAppRef); } } for (ResourceRef rr : cluster.getResourceRef()) { if (instance.getResourceRef(rr.getRef()) == null) { ResourceRef newRR = instance.createChild(ResourceRef.class); newRR.setRef(rr.getRef()); newRR.setEnabled(rr.getEnabled()); instance.getResourceRef().add(newRR); } } } } }
throw new TransactionFailure("Cannot add un-named resources to the new server instance"); ResourceRef newResourceRef = instance.createChild(ResourceRef.class); newResourceRef.setRef(name); instance.getResourceRef().add(newResourceRef); ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(application.getName());
if (dasGmsPortProp != null) { SystemProperty gmsListenerPortProp = instance.createChild(SystemProperty.class); gmsListenerPortProp.setName(propName); gmsListenerPortProp.setValue(dasGmsPortProp.getValue()); throw new TransactionFailure("Cannot add un-named resources to the new server instance"); ResourceRef newResourceRef = instance.createChild(ResourceRef.class); newResourceRef.setRef(name); instance.getResourceRef().add(newResourceRef); ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(application.getName());