private void updateServer() {
IServerWorkingCopy workingCopy = getServerWorkingCopy();
if (workingCopy != null) {
// workCopy will be instance of ServerDelegate classs.
// We need to get the params, so IFuseESBRuntime will be enough.
IKarafServerDelegateWorkingCopy karafServerWorkingCopy = (IKarafServerDelegateWorkingCopy) workingCopy
.loadAdapter(IKarafServerDelegateWorkingCopy.class,
new NullProgressMonitor());
if (karafServerWorkingCopy != null) {
karafServerWorkingCopy.setPortNumber(model.getPortNumber());
karafServerWorkingCopy.setUserName(model.getUserName());
karafServerWorkingCopy.setPassword(model.getPassword());
workingCopy.setRuntime(getRuntimeWorkingCopy());
try {
workingCopy.save(true, new NullProgressMonitor());
} catch (CoreException ex) {
Activator.getLogger().error(ex);