Public Member Functions | |
EnableWrite (VirtualDatabaseAdmin module) | |
void | parse (String commandText) throws Exception |
String | getCommandName () |
String | getCommandDescription () |
String | getCommandParameters () |
Definition at line 41 of file EnableWrite.java.
|
Creates a new
Definition at line 49 of file EnableWrite.java. 00050 { 00051 super(module); 00052 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 95 of file EnableWrite.java. 00096 { 00097 return ConsoleTranslate.get("admin.command.enable.write"); 00098 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 87 of file EnableWrite.java. 00088 { 00089 return "enableWrite"; 00090 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 103 of file EnableWrite.java. 00104 { 00105 return "<backendName>"; 00106 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 57 of file EnableWrite.java. References org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableBackendFromCheckpoint(), org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.enableWrite(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getDatabaseBackendProxy(), org.objectweb.cjdbc.console.jmx.RmiJmxClient.getVirtualDatabaseProxy(), org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.hasRecoveryLog(), org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isWriteEnabled(), and org.objectweb.cjdbc.console.text.Console.println(). 00058 { 00059 StringTokenizer st = new StringTokenizer(commandText); 00060 if (st.countTokens() != 1) 00061 throw new ConsoleException(ConsoleTranslate 00062 .get("console.error.invalid.comment.argument")); 00063 String backendName = st.nextToken(); 00064 console.println(ConsoleTranslate.get("admin.command.enable.write.echo", 00065 backendName)); 00066 VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user, 00067 password); 00068 DatabaseBackendMBean mbean = jmxClient.getDatabaseBackendProxy(dbName, 00069 backendName, user, password); 00070 if(vdjc.hasRecoveryLog()) 00071 { 00072 if(mbean.isWriteEnabled()) 00073 return; 00074 vdjc.enableBackendFromCheckpoint(backendName); 00075 } 00076 else 00077 { 00078 mbean.enableWrite(); 00079 } 00080 00081 00082 }
|