.gitignore | 1
modules/common/cassandra-bundle/pom.xml | 12
modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/CassandraException.java | 47 ++
modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/DeploymentOptions.java | 123 +++++++
modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/EmbeddedDeployer.java | 165 ++++++++++
modules/common/cassandra-bundle/src/main/resources/cassandra.properties | 5
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/startup/StartupServlet.java | 2
modules/enterprise/server/jar/pom.xml | 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerBean.java | 57 ---
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerLocal.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraException.java | 47 --
11 files changed, 361 insertions(+), 101 deletions(-)
New commits:
commit 25ed1cdb33557351484f94849e2eb896a710934d
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Sep 27 16:33:59 2012 -0400
Refactoring logic for embedded cluster deployment
This is the initial commit for EmbeddedDeployer. It performs deployment of an
embedded cluster which is the default cluster type for development. An embedded
cluster is one in which all nodes run on localhost and are bound aliases of the
loopback address, e.g., 127.0.0.2, 127.0.0.3, etc.
EmbeddedDeployer does not server APIs to deploy the cluster. More specifically,
it does not use the bundles subsystem. It does however use the Ant-based
bundles APIs to deploy the cassandra bundle. Since it does not use server APIs
which require a running agent to carry out requests, EmbeddedDeployer is
suitable for bootstrapping scenarios.
EmbeddedDeployer looks for the presence of a marker file named .installed in
the cluster directory for installing nodes. If that file exists, it assumes
that the cluster is already is installed and does not do any installation.
If the marker file is not present, anything in the cluster directory is purged
and nodes will be provisioned.
diff --git a/.gitignore b/.gitignore
index 07d07ab..3bda23f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ eclipse-classes/
logs/
antlr-generated/
gwt-tmp/
+./cassandra/
dev-container/
dev-agent/
dev-cli/
diff --git a/modules/common/cassandra-bundle/pom.xml b/modules/common/cassandra-bundle/pom.xml
index 98feb85..f8c489f 100644
--- a/modules/common/cassandra-bundle/pom.xml
+++ b/modules/common/cassandra-bundle/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.6.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-cassandra-bundle</artifactId>
@@ -17,6 +17,14 @@
<cassandra.version>1.1.5</cassandra.version>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>rhq-ant-bundle-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
<build>
<resources>
<resource>
@@ -44,7 +52,7 @@
<property name="cassandra.dir"
value="${project.build.outputDirectory}/cassandra-${cassandra.version}"/>
<property name="cassandra.distro.filename"
- value="cassandra=${cassandra.version}.zip"/>
+ value="cassandra-${cassandra.version}.zip"/>
<property name="cassandra.distro.zip"
value="${project.build.outputDirectory}/${cassandra.distro.filename}"/>
<zip basedir="${cassandra.dir}" destfile="${cassandra.distro.zip}"/>
diff --git a/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/CassandraException.java b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/CassandraException.java
new file mode 100644
index 0000000..43259ac
--- /dev/null
+++ b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/CassandraException.java
@@ -0,0 +1,47 @@
+/*
+ *
+ * * RHQ Management Platform
+ * * Copyright (C) 2005-2012 Red Hat, Inc.
+ * * All rights reserved.
+ * *
+ * * This program is free software; you can redistribute it and/or modify
+ * * it under the terms of the GNU General Public License, version 2, as
+ * * published by the Free Software Foundation, and/or the GNU Lesser
+ * * General Public License, version 2.1, also as published by the Free
+ * * Software Foundation.
+ * *
+ * * This program is distributed in the hope that it will be useful,
+ * * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * * GNU General Public License and the GNU Lesser General Public License
+ * * for more details.
+ * *
+ * * You should have received a copy of the GNU General Public License
+ * * and the GNU Lesser General Public License along with this program;
+ * * if not, write to the Free Software Foundation, Inc.,
+ * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+package org.rhq.cassandra;
+
+/**
+ * @author John Sanda
+ */
+public class CassandraException extends Exception {
+ public CassandraException() {
+ super();
+ }
+
+ public CassandraException(String message) {
+ super(message);
+ }
+
+ public CassandraException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public CassandraException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/DeploymentOptions.java b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/DeploymentOptions.java
new file mode 100644
index 0000000..93fada3
--- /dev/null
+++ b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/DeploymentOptions.java
@@ -0,0 +1,123 @@
+/*
+ *
+ * * RHQ Management Platform
+ * * Copyright (C) 2005-2012 Red Hat, Inc.
+ * * All rights reserved.
+ * *
+ * * This program is free software; you can redistribute it and/or modify
+ * * it under the terms of the GNU General Public License, version 2, as
+ * * published by the Free Software Foundation, and/or the GNU Lesser
+ * * General Public License, version 2.1, also as published by the Free
+ * * Software Foundation.
+ * *
+ * * This program is distributed in the hope that it will be useful,
+ * * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * * GNU General Public License and the GNU Lesser General Public License
+ * * for more details.
+ * *
+ * * You should have received a copy of the GNU General Public License
+ * * and the GNU Lesser General Public License along with this program;
+ * * if not, write to the Free Software Foundation, Inc.,
+ * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+package org.rhq.cassandra.bundle;
+
+import java.util.Properties;
+
+/**
+ * @author John Sanda
+ */
+public class DeploymentOptions {
+
+ private String bundleFileName;
+ private String bundleName;
+ private String bundleVersion;
+ private String clusterDir;
+ private Integer numNodes;
+ private Boolean autoDeploy;
+ private String clusterType;
+
+ public DeploymentOptions(Properties properties) {
+ setBundleFileName(properties.getProperty("rhq.cassandra.bundle.filename"));
+ setBundleName(properties.getProperty("rhq.cassandra.bundle.name"));
+ setBundleVersion(properties.getProperty("rhq.cassandra.bundle.version"));
+ setClusterDir(properties.getProperty("rhq.cassandra.cluster.dir"));
+ setNumNodes(Integer.parseInt(properties.getProperty("rhq.cassandra.cluster.num-nodes")));
+ setAutoDeploy(Boolean.valueOf(properties.getProperty("rhq.cassandra.cluster.auto-deploy")));
+ setClusterType(properties.getProperty("rhq.cassandra.cluster.type"));
+ }
+
+ public String getBundleFileName() {
+ return bundleFileName;
+ }
+
+ public void setBundleFileName(String name) {
+ if (bundleFileName == null) {
+ bundleFileName = name;
+ }
+ }
+
+ public String getBundleName() {
+ return bundleName;
+ }
+
+ public void setBundleName(String name) {
+ if (bundleName == null) {
+ bundleName = name;
+ }
+ }
+
+ public String getBundleVersion() {
+ return bundleVersion;
+ }
+
+ public void setBundleVersion(String version) {
+ if (bundleVersion == null) {
+ bundleVersion = version;
+ }
+ }
+
+ public String getClusterDir() {
+ return clusterDir;
+ }
+
+ public void setClusterDir(String dir) {
+ if (clusterDir == null) {
+ clusterDir = dir;
+ }
+ }
+
+ public int getNumNodes() {
+ return numNodes;
+ }
+
+ public void setNumNodes(int numNodes) {
+ if (this.numNodes == null) {
+ this.numNodes = numNodes;
+ }
+ }
+
+ public boolean isAutoDeploy() {
+ return autoDeploy;
+ }
+
+ public void setAutoDeploy(boolean autoDeploy) {
+ if (this.autoDeploy == null) {
+ this.autoDeploy = autoDeploy;
+ }
+ }
+
+ public String getClusterType() {
+ return clusterType;
+ }
+
+ public void setClusterType(String clusterType) {
+ if (this.clusterType == null) {
+ this.clusterType = clusterType;
+ }
+ }
+
+}
diff --git a/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/EmbeddedDeployer.java b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/EmbeddedDeployer.java
new file mode 100644
index 0000000..0e6b952
--- /dev/null
+++ b/modules/common/cassandra-bundle/src/main/java/org/rhq/cassandra/bundle/EmbeddedDeployer.java
@@ -0,0 +1,165 @@
+/*
+ *
+ * * RHQ Management Platform
+ * * Copyright (C) 2005-2012 Red Hat, Inc.
+ * * All rights reserved.
+ * *
+ * * This program is free software; you can redistribute it and/or modify
+ * * it under the terms of the GNU General Public License, version 2, as
+ * * published by the Free Software Foundation, and/or the GNU Lesser
+ * * General Public License, version 2.1, also as published by the Free
+ * * Software Foundation.
+ * *
+ * * This program is distributed in the hope that it will be useful,
+ * * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * * GNU General Public License and the GNU Lesser General Public License
+ * * for more details.
+ * *
+ * * You should have received a copy of the GNU General Public License
+ * * and the GNU Lesser General Public License along with this program;
+ * * if not, write to the Free Software Foundation, Inc.,
+ * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+package org.rhq.cassandra.bundle;
+
+import static org.rhq.core.util.StringUtil.collectionToString;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import org.rhq.bundle.ant.AntLauncher;
+import org.rhq.cassandra.CassandraException;
+import org.rhq.core.util.ZipUtil;
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.core.util.stream.StreamUtil;
+
+/**
+ * @author John Sanda
+ */
+public class EmbeddedDeployer {
+
+ public void deploy(DeploymentOptions deploymentOptions) throws CassandraException {
+ Set<String> ipAddresses = calculateLocalIPAddresses(deploymentOptions.getNumNodes());
+ File clusterDir = new File(deploymentOptions.getClusterDir());
+ File installedMarker = new File(clusterDir, ".installed");
+
+ if (installedMarker.exists()) {
+ return;
+ }
+
+ FileUtil.purge(clusterDir, false);
+
+ File bundleZipeFile = null;
+ File bundleDir = null;
+
+ try {
+ bundleZipeFile = unpackBundleZipFile();
+ bundleDir = unpackBundle(bundleZipeFile);
+
+ for (int i = 0; i < deploymentOptions.getNumNodes(); ++i) {
+ Set<String> seeds = getSeeds(ipAddresses, i + 1);
+ int jmxPort = 7200 + i;
+
+ Properties props = new Properties();
+ props.put("cluster.name", "rhq");
+ props.put("cluster.dir", clusterDir.getAbsolutePath());
+ props.put("auto.bootstrap", "false");
+ props.put("data.dir", "data");
+ props.put("commitlog.dir", "commit_log");
+ props.put("log.dir", "logs");
+ props.put("saved.caches.dir", "saved_caches");
+ props.put("hostname", getLocalIPAddress(i + 1));
+ props.put("seeds", collectionToString(seeds));
+ props.put("jmx.port", Integer.toString(jmxPort));
+ props.put("initial.token", generateToken(i, deploymentOptions.getNumNodes()));
+ props.put("rhq.deploy.dir", new File(clusterDir, "node" + i).getAbsolutePath());
+ props.put("rhq.deploy.id", i);
+ props.put("rhq.deploy.phase", "install");
+
+ doLocalDeploy(props, bundleDir);
+ }
+ FileUtil.writeFile(new ByteArrayInputStream(new byte[] {0}), installedMarker);
+ } catch (IOException e) {
+ throw new CassandraException("Failed to deploy embedded cluster", e);
+ } finally {
+ if (bundleZipeFile != null) {
+ bundleZipeFile.delete();
+ }
+
+ if (bundleDir != null) {
+ FileUtil.purge(bundleDir, true);
+ }
+ }
+ }
+
+ private void doLocalDeploy(Properties deployProps, File bundleDir) throws CassandraException {
+ AntLauncher launcher = new AntLauncher();
+ try {
+ File recipeFile = new File(bundleDir, "deploy.xml");
+ launcher.executeBundleDeployFile(recipeFile, deployProps, null);
+ } catch (Exception e) {
+ String msg = "Failed to execute local rhq cassandra bundle deployment";
+ //logException(msg, e);
+ throw new CassandraException(msg, e);
+ }
+ }
+
+ private File unpackBundleZipFile() throws IOException {
+ InputStream bundleInputStream = getClass().getResourceAsStream("/cassandra-bundle.zip");
+ File bundleZipFile = File.createTempFile("cassandra-bundle.zip", null);
+ StreamUtil.copy(bundleInputStream, new FileOutputStream(bundleZipFile));
+
+ return bundleZipFile;
+ }
+
+ private File unpackBundle(File bundleZipFile) throws IOException {
+ File bundleDir = new File(System.getProperty("java.io.tmpdir"), "rhq-cassandra-bundle");
+ bundleDir.mkdir();
+ ZipUtil.unzipFile(bundleZipFile, bundleDir);
+
+ return bundleDir;
+ }
+
+ private Set<String> calculateLocalIPAddresses(int numNodes) {
+ Set<String> addresses = new HashSet<String>();
+ for (int i = 1; i <= numNodes; ++i) {
+ addresses.add(getLocalIPAddress(i));
+ }
+ return addresses;
+ }
+
+ private String getLocalIPAddress(int i) {
+ return "127.0.0." + i;
+ }
+
+ private String generateToken(int i, int numNodes) {
+ BigInteger num = new BigInteger("2").pow(127).divide(new BigInteger(Integer.toString(numNodes)));
+ return num.multiply(new BigInteger(Integer.toString(i))).toString();
+ }
+
+ private Set<String> getSeeds(Set<String> addresses, int i) {
+ Set<String> seeds = new HashSet<String>();
+ String address = getLocalIPAddress(i);
+
+ for (String nodeAddress : addresses) {
+ if (nodeAddress.equals(address)) {
+ continue;
+ } else {
+ seeds.add(nodeAddress);
+ }
+ }
+
+ return seeds;
+ }
+
+}
diff --git a/modules/common/cassandra-bundle/src/main/resources/cassandra.properties b/modules/common/cassandra-bundle/src/main/resources/cassandra.properties
index 9fdc17a..d2fc1e4 100644
--- a/modules/common/cassandra-bundle/src/main/resources/cassandra.properties
+++ b/modules/common/cassandra-bundle/src/main/resources/cassandra.properties
@@ -1,3 +1,8 @@
rhq.cassandra.bundle.filename=/cassandra-bundle.zip
rhq.cassandra.bundle.name=RHQ Cassandra Bundle
rhq.cassandra.bundle.version=1.0
+
+rhq.cassandra.cluster.dir=${rhq.rootDir}/cassandra
+rhq.cassandra.cluster.num-nodes=2
+rhq.cassandra.cluster.auto-deploy=true
+rhq.cassandra.cluster.type=embedded
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/startup/StartupServlet.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/startup/StartupServlet.java
index eeae59d..b3f57aa 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/startup/StartupServlet.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/startup/StartupServlet.java
@@ -58,7 +58,7 @@ import org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordi
import org.rhq.enterprise.server.auth.SessionManager;
import org.rhq.enterprise.server.auth.prefs.SubjectPreferencesCache;
import org.rhq.enterprise.server.cassandra.CassandraClusterManagerLocal;
-import org.rhq.enterprise.server.cassandra.CassandraException;
+import org.rhq.cassandra.CassandraException;
import org.rhq.enterprise.server.cloud.instance.ServerManagerLocal;
import org.rhq.enterprise.server.cloud.instance.SyncEndpointAddressException;
import org.rhq.enterprise.server.core.AgentManagerLocal;
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 6a8dd03..24a3333 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -85,7 +85,6 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-cassandra-bundle</artifactId>
<version>${project.version}</version>
- <scope>runtime</scope>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerBean.java
index 337f6e0..ef6e94e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerBean.java
@@ -44,6 +44,9 @@ import javax.ejb.TransactionAttribute;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.rhq.cassandra.CassandraException;
+import org.rhq.cassandra.bundle.DeploymentOptions;
+import org.rhq.cassandra.bundle.EmbeddedDeployer;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.bundle.Bundle;
import org.rhq.core.domain.bundle.BundleDestination;
@@ -97,7 +100,6 @@ public class CassandraClusterManagerBean implements CassandraClusterManagerLocal
logException(msg, e);
throw new CassandraException(msg, e);
}
-
File deployBaseDir = getDeployBaseDir();
Subject overlord = subjectManager.getOverlord();
String bundleName = deploymentProps.getProperty("rhq.cassandra.bundle.name");
@@ -121,52 +123,11 @@ public class CassandraClusterManagerBean implements CassandraClusterManagerLocal
throw new CassandraException(msg, e);
}
-// Configuration bundleConfig = new Configuration();
-// File clusterDir = getClusterDir(); //new File(params.getSimpleValue("clusterDirectory"));
-// int numNodes = 2; //Integer.parseInt(params.getSimpleValue("numberOfNodes"));
-// int replicationFactor = 1; //Integer.parseInt(params.getSimpleValue("replicationFactor", "1"));
-// String hostname = "localhost"; //params.getSimpleValue("host");
+ EmbeddedDeployer deployer = new EmbeddedDeployer();
+ deployer.deploy(new DeploymentOptions(deploymentProps));
+
// Resource platform = getPlatform(overlord, hostname);
// ResourceGroup group = getPlatformGroup(overlord, platform, hostname);
-//
-// Set<String> ipAddresses = calculateLocalIPAddresses(numNodes);
-// for (int i = 0; i < numNodes; ++i) {
-// Set<String> seeds = getSeeds(ipAddresses, i + 1);
-// int jmxPort = 7200 + i;
-//
-// Configuration deploymentConfig = new Configuration();
-// deploymentConfig.put(new PropertySimple("cluster.name", "rhqdev"));
-// deploymentConfig.put(new PropertySimple("cluster.dir", clusterDir.getAbsolutePath()));
-// deploymentConfig.put(new PropertySimple("auto.bootstrap", "false"));
-// deploymentConfig.put(new PropertySimple("data.dir", "data"));
-// deploymentConfig.put(new PropertySimple("commitlog.dir", "commit_log"));
-// deploymentConfig.put(new PropertySimple("log.dir", "logs"));
-// deploymentConfig.put(new PropertySimple("saved.caches.dir", "saved_caches"));
-// deploymentConfig.put(new PropertySimple("hostname", getLocalIPAddress(i + 1)));
-// deploymentConfig.put(new PropertySimple("seeds", collectionToString(seeds)));
-// deploymentConfig.put(new PropertySimple("jmx.port", Integer.toString(jmxPort)));
-// deploymentConfig.put(new PropertySimple("initial.token", generateToken(i, numNodes)));
-// deploymentConfig.put(new PropertySimple("install.schema", i == 0));
-// deploymentConfig.put(new PropertySimple("replication.factor", replicationFactor));
-//
-// String destinationName = "cassandra-node[" + i + "]-deployment";
-// String deployDir = new File(clusterDir, "node" + i).getAbsolutePath();
-//
-// BundleDestination bundleDestination = null;
-// try {
-// bundleDestination = getBundleDestination(overlord, bundleVersion, destinationName, group,
-// deployDir);
-// } catch (Exception e) {
-// String msg = "Failed to create bundle destination [" + destinationName + "]";
-// logException(msg, e);
-// throw new CassandraException(msg, e);
-// }
-//
-//// BundleDeployment bundleDeployment = bundleManager.createBundleDeployment(overlord, bundleVersion.getId(),
-//// bundleDestination.getId(), destinationName, deploymentConfig);
-//
-//// bundleManager.scheduleBundleDeployment(overlord, bundleDeployment.getId(), true);
-// }
}
private Properties loadDeploymentProps() throws IOException {
@@ -189,10 +150,6 @@ public class CassandraClusterManagerBean implements CassandraClusterManagerLocal
}
}
- public void deployBundle() {
-
- }
-
private void logException(String msg, Exception e) {
if (log.isDebugEnabled()) {
log.debug(msg, e);
@@ -310,7 +267,7 @@ public class CassandraClusterManagerBean implements CassandraClusterManagerLocal
}
private ResourceGroup getPlatformGroup(Subject overlord, Resource platform, String hostname) {
- String groupName = hostname + " [Local Cassandra Cluster]";
+ String groupName = "RHQ Cassandra Cluster";
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
criteria.addFilterExplicitResourceCategory(ResourceCategory.PLATFORM);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerLocal.java
index 2ce1291..20cadef 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraClusterManagerLocal.java
@@ -27,6 +27,8 @@ package org.rhq.enterprise.server.cassandra;
import javax.ejb.Local;
+import org.rhq.cassandra.CassandraException;
+
/**
* @author John Sanda
*/
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraException.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraException.java
deleted file mode 100644
index 78387b1..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cassandra/CassandraException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * * RHQ Management Platform
- * * Copyright (C) 2005-2012 Red Hat, Inc.
- * * All rights reserved.
- * *
- * * This program is free software; you can redistribute it and/or modify
- * * it under the terms of the GNU General Public License, version 2, as
- * * published by the Free Software Foundation, and/or the GNU Lesser
- * * General Public License, version 2.1, also as published by the Free
- * * Software Foundation.
- * *
- * * This program is distributed in the hope that it will be useful,
- * * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * * GNU General Public License and the GNU Lesser General Public License
- * * for more details.
- * *
- * * You should have received a copy of the GNU General Public License
- * * and the GNU Lesser General Public License along with this program;
- * * if not, write to the Free Software Foundation, Inc.,
- * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package org.rhq.enterprise.server.cassandra;
-
-/**
- * @author John Sanda
- */
-public class CassandraException extends Exception {
- public CassandraException() {
- super();
- }
-
- public CassandraException(String message) {
- super(message);
- }
-
- public CassandraException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public CassandraException(Throwable cause) {
- super(cause);
- }
-}