Code cleanup and fixing build failures

revert-70aa11f8
prabathabey 10 years ago
parent 3fb61d9c8b
commit d5127f6874

@ -125,7 +125,7 @@ public class DeviceManagementServiceComponent {
} }
/* Registering Device Management Service */ /* Registering Device Management Service */
BundleContext bundleContext = componentContext.getBundleContext(); BundleContext bundleContext = componentContext.getBundleContext();
bundleContext.registerService(DeviceManagementServiceImpl.class.getName(), bundleContext.registerService(DeviceManagementService.class.getName(),
new DeviceManagementServiceImpl(), null); new DeviceManagementServiceImpl(), null);
} }

@ -66,7 +66,7 @@ public class OperationManagerImpl implements OperationManager {
try { try {
OperationManagementDAOFactory.rollbackTransaction(); OperationManagementDAOFactory.rollbackTransaction();
} catch (OperationManagementDAOException e1) { } catch (OperationManagementDAOException e1) {
log.warn("Error occurred while roll-backing the transaction", e); log.warn("Error occurred while roll-backing the transaction", e1);
} }
throw new OperationManagementException("Error occurred while adding operation", e); throw new OperationManagementException("Error occurred while adding operation", e);
} }

@ -41,15 +41,15 @@ public class OperationManagementDAOFactory {
private static ThreadLocal<Connection> currentConnection = new ThreadLocal<Connection>(); private static ThreadLocal<Connection> currentConnection = new ThreadLocal<Connection>();
public static OperationDAO getCommandOperationDAO() { public static OperationDAO getCommandOperationDAO() {
return new CommandOperationDAOImpl(dataSource); return new CommandOperationDAOImpl();
} }
public static OperationDAO getConfigOperationDAO() { public static OperationDAO getConfigOperationDAO() {
return new ConfigOperationDAOImpl(dataSource); return new ConfigOperationDAOImpl();
} }
public static OperationDAO getSimpleOperationDAO() { public static OperationDAO getSimpleOperationDAO() {
return new SimpleOperationDAOImpl(dataSource); return new SimpleOperationDAOImpl();
} }
public static OperationMappingDAO getOperationMappingDAO() { public static OperationMappingDAO getOperationMappingDAO() {

@ -31,16 +31,6 @@ import java.sql.SQLException;
public abstract class AbstractOperationDAO implements OperationDAO { public abstract class AbstractOperationDAO implements OperationDAO {
private DataSource dataSource;
public AbstractOperationDAO(DataSource dataSource) {
this.dataSource = dataSource;
}
public DataSource getDataSource() {
return dataSource;
}
public int addOperation(Operation operation) throws OperationManagementDAOException { public int addOperation(Operation operation) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet rs = null; ResultSet rs = null;

@ -33,10 +33,6 @@ import java.util.List;
public class CommandOperationDAOImpl extends AbstractOperationDAO { public class CommandOperationDAOImpl extends AbstractOperationDAO {
public CommandOperationDAOImpl(DataSource dataSource) {
super(dataSource);
}
@Override @Override
public int addOperation(Operation operation) throws OperationManagementDAOException { public int addOperation(Operation operation) throws OperationManagementDAOException {
int operationId = super.addOperation(operation); int operationId = super.addOperation(operation);

@ -27,10 +27,6 @@ import java.util.List;
public class ConfigOperationDAOImpl extends AbstractOperationDAO { public class ConfigOperationDAOImpl extends AbstractOperationDAO {
public ConfigOperationDAOImpl(DataSource dataSource) {
super(dataSource);
}
@Override @Override
public int addOperation(Operation operation) throws OperationManagementDAOException { public int addOperation(Operation operation) throws OperationManagementDAOException {
return 0; return 0;

@ -26,10 +26,6 @@ import java.util.List;
public class SimpleOperationDAOImpl extends AbstractOperationDAO { public class SimpleOperationDAOImpl extends AbstractOperationDAO {
public SimpleOperationDAOImpl(DataSource dataSource) {
super(dataSource);
}
@Override @Override
public int updateOperation(Operation operation) throws OperationManagementDAOException { public int updateOperation(Operation operation) throws OperationManagementDAOException {
return 0; return 0;

Loading…
Cancel
Save