Commit a3645255 authored by shake's avatar shake
Browse files

Bug fixes and small syntax changes

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@181 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent 1a83ca7c
......@@ -3,7 +3,7 @@ Version: 1.7.1
Section: misc
Priority: extra
Architecture: all
Depends: mysql-server, tomcat6, debconf (>= 0.5)
Depends: mysql-server, libmysql-java, tomcat6, debconf (>= 0.5)
Maintainer: shake <shake@umiacs.umd.edu>
Description: Audit Control Environment
Distribution: development
......@@ -114,6 +114,7 @@ public final class AuditConfigurationContext implements ServletContextListener {
AuditThreadFactory.setAuditOnly(Boolean.valueOf(s.getValue()));
}catch ( NoResultException ex ) {
EntityTransaction trans = em.getTransaction();
trans.begin();
em.persist(new SettingsParameter(SettingsConstants.PARAM_AUDIT_ONLY,
SettingsConstants.auditOnly, false));
trans.commit();
......
......@@ -74,7 +74,7 @@ public class AuditThreadFactory {
AuditThreadFactory.imsPort = imsPort;
}
static void setAuditOnly(boolean auditOnlyMode) {
public static void setAuditOnly(boolean auditOnlyMode) {
AuditThreadFactory.auditOnly = auditOnlyMode;
}
......
......@@ -22,7 +22,6 @@ public class IngestContextListener implements ServletContextListener {
public void contextInitialized(ServletContextEvent sce) {
NDC.push("[Ingest startup]");
System.out.println("INGEST STARTOOP");
EntityManager em = PersistUtil.getEntityManager();
Query threadQuery = em.createNamedQuery("SettingsParameter.getAttr");
threadQuery.setParameter("attr", PARAM_INGEST);
......@@ -31,14 +30,10 @@ public class IngestContextListener implements ServletContextListener {
IngestThreadPool pool = IngestThreadPool.getInstance();
//pool.start();
//IngestThreadPool factory = new IngestThreadPool();
//factory.start();
}
public void contextDestroyed(ServletContextEvent sce) {
IngestThreadPool.shutdownPools();
IngestThreadPool pool = IngestThreadPool.getInstance();
//pool.interrupt();
}
}
......@@ -7,8 +7,6 @@ package edu.umiacs.ace.rest;
import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.util.PersistUtil;
import java.util.logging.Level;
import javax.annotation.security.RolesAllowed;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;
import javax.ws.rs.Consumes;
......@@ -18,17 +16,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.apache.log4j.Logger;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.codehaus.jettison.mapped.Configuration;
import org.codehaus.jettison.mapped.MappedNamespaceConvention;
import org.codehaus.jettison.mapped.MappedXMLStreamReader;
/**
* REST Service for adding and viewing collections
......@@ -51,7 +39,6 @@ public class CollectionManagement {
}
@POST
@Path("/")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public void addCollection(Collection coll){
checkCollection(coll);
......@@ -65,7 +52,6 @@ public class CollectionManagement {
@GET
@Produces(MediaType.APPLICATION_XML)
@Path("xml/{id}")
@RolesAllowed("Browse")
public Collection getCollectionXML(@PathParam("id") long collId){
EntityManager em = PersistUtil.getEntityManager();
return em.find(Collection.class, collId);
......@@ -74,7 +60,6 @@ public class CollectionManagement {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("json/{id}")
@RolesAllowed({"Browse"})
public Collection getCollectionJSON(@PathParam("id") long collId){
EntityManager em = PersistUtil.getEntityManager();
return em.find(Collection.class, collId);
......
ALTER TABLE collection MODIFY `DIGESTALGORITHM` varchar(20) NOT NULL DEFAULT 'SHA-256';
ALTER TABLE system_settings ADD `CUSTOM` BOOLEAN DEFAULT FALSE;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment