Compare commits
No commits in common. "221aea252064a4772e5bb420365bfbd73f14d3cf" and "6e39b2e883f46a1c93c26f371fe3ddae89fded9d" have entirely different histories.
221aea2520
...
6e39b2e883
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
/qserv-test/
|
@ -112,7 +112,6 @@ public class QueueStatusReceiverServlet extends HttpServlet
|
||||
|
||||
@Override
|
||||
public void onMessage(Message jmsMessage) {
|
||||
assert jmsMessage != null;
|
||||
Transaction transaction = null;
|
||||
messageCount++;
|
||||
try {
|
||||
@ -124,13 +123,7 @@ public class QueueStatusReceiverServlet extends HttpServlet
|
||||
transaction.beginTransaction();
|
||||
EntityManager em = transaction.getEntityManager();
|
||||
em.clear();
|
||||
final long queueTaskId = detachedQT.getId();
|
||||
QueueTask persistentQT = em.find(QueueTask.class, queueTaskId);
|
||||
if (persistentQT == null) {
|
||||
jmsMessage.acknowledge();
|
||||
errorCount++;
|
||||
throw new TechnicalException("QueueTask not found, id: " + queueTaskId);
|
||||
}
|
||||
QueueTask persistentQT = em.find(QueueTask.class, detachedQT.getId());
|
||||
persistentQT.assign(detachedQT);
|
||||
Processor processor = persistentQT.getProcessor();
|
||||
if (processor != null) {
|
||||
@ -140,7 +133,6 @@ public class QueueStatusReceiverServlet extends HttpServlet
|
||||
em.flush();
|
||||
transaction.commitTransaction();
|
||||
} else {
|
||||
errorCount++;
|
||||
final String err = "Deserialization failed " + new Date();
|
||||
System.out.println(err);
|
||||
throw new TechnicalException(err);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.hsadmin</groupId>
|
||||
<artifactId>hsadmin-qserv</artifactId>
|
||||
<version>4.0.16</version>
|
||||
<version>4.0.15</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HSAdmin-QServ</name>
|
||||
@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>de.hsadmin.core</groupId>
|
||||
<artifactId>hsadmin-qserv</artifactId>
|
||||
<version>4.0.16</version>
|
||||
<version>4.0.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
|
@ -145,10 +145,8 @@ public class Transaction {
|
||||
if (transactionActive) {
|
||||
rollbackTransaction();
|
||||
}
|
||||
if (entityManager != null) {
|
||||
entityManager.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detach entities from JPA session.
|
||||
|
Loading…
Reference in New Issue
Block a user