You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/06/19 10:24:09 UTC
svn commit: r1351595 - in
/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal:
InstanceImpl.java InstanceServiceImpl.java InstanceToTableMapper.java
Instances.java
Author: jbonofre
Date: Tue Jun 19 08:24:08 2012
New Revision: 1351595
URL: http://svn.apache.org/viewvc?rev=1351595&view=rev
Log:
Fix instance messages
Modified:
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceImpl.java
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceToTableMapper.java
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/Instances.java
Modified: karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceImpl.java
URL: http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceImpl.java?rev=1351595&r1=1351594&r2=1351595&view=diff
==============================================================================
--- karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceImpl.java (original)
+++ karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceImpl.java Tue Jun 19 08:24:08 2012
@@ -76,7 +76,7 @@ public class InstanceImpl implements Ins
public void attach(int pid) throws IOException {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances already started");
+ throw new IllegalStateException("Instance already started");
}
this.process = processBuilderFactory.newBuilder().attach(pid);
}
@@ -122,7 +122,7 @@ public class InstanceImpl implements Ins
public void changeSshPort(int port) throws Exception {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
this.changeConfiguration(new File(location, "etc/org.apache.karaf.shell.cfg"),
"sshPort", Integer.toString(port));
@@ -140,7 +140,7 @@ public class InstanceImpl implements Ins
public void changeRmiRegistryPort(int port) throws Exception {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
this.changeConfiguration(new File(location, "etc/org.apache.karaf.management.cfg"),
"rmiRegistryPort", Integer.toString(port));
@@ -158,7 +158,7 @@ public class InstanceImpl implements Ins
public void changeRmiServerPort(int port) throws Exception {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
this.changeConfiguration(new File(location, "etc/org.apache.karaf.management.cfg"),
"rmiServerPort", Integer.toString(port));
@@ -214,7 +214,7 @@ public class InstanceImpl implements Ins
public synchronized void start(String javaOpts) throws Exception {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances already started");
+ throw new IllegalStateException("Instance already started");
}
if (javaOpts == null || javaOpts.length() == 0) {
javaOpts = this.javaOpts;
@@ -273,7 +273,7 @@ public class InstanceImpl implements Ins
public synchronized void stop() throws Exception {
checkProcess();
if (this.process == null) {
- throw new IllegalStateException("Instances not started");
+ throw new IllegalStateException("Instance not started");
}
// Try a clean shutdown
cleanShutdown();
@@ -285,7 +285,7 @@ public class InstanceImpl implements Ins
public synchronized void destroy() throws Exception {
checkProcess();
if (this.process != null) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
deleteFile(new File(location));
this.service.forget(name);
Modified: karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
URL: http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java?rev=1351595&r1=1351594&r2=1351595&view=diff
==============================================================================
--- karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java (original)
+++ karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java Tue Jun 19 08:24:08 2012
@@ -149,7 +149,7 @@ public class InstanceServiceImpl impleme
public synchronized Instance createInstance(String name, InstanceSettings settings, boolean printOutput) throws Exception {
if (instances.get(name) != null) {
- throw new IllegalArgumentException("Instances '" + name + "' already exists");
+ throw new IllegalArgumentException("Instance '" + name + "' already exists");
}
String loc = settings.getLocation() != null ? settings.getLocation() : name;
File karafBase = new File(loc);
@@ -269,17 +269,17 @@ public class InstanceServiceImpl impleme
public synchronized void renameInstance(String oldName, String newName, boolean printOutput) throws Exception {
if (instances.get(newName) != null) {
- throw new IllegalArgumentException("Instances " + newName + " already exists");
+ throw new IllegalArgumentException("Instance " + newName + " already exists");
}
Instance instance = instances.get(oldName);
if (instance == null) {
- throw new IllegalArgumentException("Instances " + oldName + " not found");
+ throw new IllegalArgumentException("Instance " + oldName + " not found");
}
if (instance.isRoot()) {
throw new IllegalArgumentException("Root instance cannot be renamed");
}
if (instance.getPid() != 0) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
logInfo("Renaming instance %s to %s", printOutput, oldName, newName);
@@ -318,17 +318,17 @@ public class InstanceServiceImpl impleme
public synchronized Instance cloneInstance(String name, String cloneName, InstanceSettings settings, boolean printOutput) throws Exception {
if (instances.get(cloneName) != null) {
- throw new IllegalArgumentException("Instances " + cloneName + " already exists");
+ throw new IllegalArgumentException("Instance " + cloneName + " already exists");
}
Instance instance = instances.get(name);
if (instance == null) {
- throw new IllegalArgumentException("Instances " + name + " not found");
+ throw new IllegalArgumentException("Instance " + name + " not found");
}
if (instance.isRoot()) {
throw new IllegalArgumentException("Root instance cannot be cloned");
}
if (instance.getPid() != 0) {
- throw new IllegalStateException("Instances not stopped");
+ throw new IllegalStateException("Instance not stopped");
}
logInfo("Cloning instance %s into %s", printOutput, name, cloneName);
Modified: karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceToTableMapper.java
URL: http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceToTableMapper.java?rev=1351595&r1=1351594&r2=1351595&view=diff
==============================================================================
--- karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceToTableMapper.java (original)
+++ karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceToTableMapper.java Tue Jun 19 08:24:08 2012
@@ -50,7 +50,7 @@ public class InstanceToTableMapper {
}
private static CompositeType createRowType() throws OpenDataException {
- String desc = "This type describes Karaf instances";
+ String desc = "This type describes Karaf instance";
OpenType<?>[] itemTypes = new OpenType[] {SimpleType.INTEGER, SimpleType.STRING, SimpleType.BOOLEAN,
SimpleType.INTEGER, SimpleType.INTEGER, SimpleType.INTEGER,
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING};
Modified: karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/Instances.java
URL: http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/Instances.java?rev=1351595&r1=1351594&r2=1351595&view=diff
==============================================================================
--- karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/Instances.java (original)
+++ karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/Instances.java Tue Jun 19 08:24:08 2012
@@ -98,7 +98,7 @@ public class Instances extends StandardM
private Instance getExistingInstance(String name) {
Instance i = instanceService.getInstance(name);
if (i == null) {
- throw new IllegalArgumentException("Instances '" + name + "' does not exist");
+ throw new IllegalArgumentException("Instance '" + name + "' does not exist");
}
return i;
}