1 package org.enhydra.shark.corbaclient.actions; 2 3 import org.omg.WfBase.*; 4 5 import java.awt.event.*; 6 import javax.swing.*; 7 8 import org.enhydra.shark.corbaclient.*; 9 import org.enhydra.shark.corba.WorkflowService.*; 10 11 17 public class ShutdownEngine extends ActionBase { 18 19 public ShutdownEngine (SharkClient workflowClient) { 20 super(workflowClient); 21 } 22 23 public void actionPerformed(ActionEvent e) { 24 SharkClient workflowClient=(SharkClient)actionPanel; 25 try { 26 workflowClient.onDisconnectOrShutdown(); 27 SharkConnection wcs=workflowClient.getService(); 28 workflowClient.setService(null); 29 workflowClient.setUsername(null); 30 workflowClient.clearComponents(); 31 try { 32 SharkClient.getExecAmin().shutdown(); 33 } catch (BaseException be) { 34 JOptionPane.showMessageDialog(workflowClient.getWindow(), 35 ResourceManager.getLanguageDependentString("ErrorTheServerIsPerformingCriticalOperationTryToShutdownLater"), 36 SharkClient.getAppTitle(), 37 JOptionPane.INFORMATION_MESSAGE); 38 } 39 } catch (Exception ex) {} 40 } 41 42 } 43 44 | Popular Tags |