Added JMX Port Parameter
Change-Id: I5c33310ad334da6a4559a3a94fec7244f23f3af4
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceDelegate.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceDelegate.java
index 85c01b5..41e9270 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceDelegate.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceDelegate.java
@@ -275,7 +275,22 @@
}
- @SuppressWarnings("restriction")
+
+ public void setJMXPort(int port) {
+ setAttribute(IOSGIFrameworkInstance.PROPERTY_JMX_PORT, ""+port);
+ }
+
+ public int getJMXPort() {
+ int port = 12345;
+ String portNo = getAttribute(PROPERTY_JMX_PORT, "12345");
+ try{
+ port = Integer.parseInt(portNo);
+ }finally{
+
+ }
+ return port;
+ }
+
public abstract ITargetDefinition createDefaultTarget()
throws CoreException;
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/IOSGIFrameworkInstance.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/IOSGIFrameworkInstance.java
index 09f0fe2..0c31152 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/IOSGIFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/IOSGIFrameworkInstance.java
@@ -24,6 +24,7 @@
public static final String PROPERTY_INSTANCE_DIR = "instanceDir";
public static final String PROPERTY_DEPLOY_DIR = "deployDir";
public static final String PROPERTY_JAVA_PROFILE = "JAVA_PROFILE";
+ public static final String PROPERTY_JMX_PORT = "jmxPort";
/**
* Gets the java profile for the framework instance. If not set,
@@ -35,6 +36,16 @@
public String getJavaPofile();
public void setJavaProfile(String id);
+ /**
+ * Gets the jmx management port for the framework instance. If not set,
+ * the instance profile returns the default value (12345).
+ *
+ * @return javaProfile for the framework instance exists. Returns null
+ * if not set.
+ */
+ public int getJMXPort();
+ public void setJMXPort(int port);
+
/**
* Gets the directory where the server instance exists. If not set,