Ich bekomme viele JMSRuntimeExceptions, wenn ich eine Entität an ein Thema sende. Der JMSContext ist ein Container, der von JBoss EAP 7 verwaltet wird. Hier ist der Code zum Senden der Entität an Thema und Warteschlange. Ich erhalte viele stacktraces und meine Log-Datei überschreitet die Grenze von 30 GB in wenigen Stunden:JBoss EAP 7.0 wirft viele JMSRuntimeExceptions
@Inject
private JMSContext context;
@Resource(name = "java:/jms/topic/my.status.topic")
private Topic myStatusTopic;
@Resource(name = "java:/jms/queue/my.status.queue")
private Queue myStatusQueue;
public void handleEntities(@Nonnull final MyList myList)
for (ListObject listElement: myList) {
myEntity = new MyEntity();
notifyQueues(myEntity);
}
}
private void notifyQueues(@Nonnull final MyEntity myEntity) {
try {
JMSProducer producer = context.createProducer();
producer.send(myStatusTopic, myEntity);
producer.send(myStatusQueue, myEntity);
}
catch(JMSRuntimeException e) {
logger.warn("Error while sending: " + e.getMessage());
}
}
Dies hat das Unternehmen ist:
@Entity
public class MyChangeEntity implements Serializable {
private static final long serialVersionUID = 1L;
private long id;
private Instant created = Instant.now();
private Integer customVersion;
...
}
Und hier ist die Ausnahme:
javax.ejb.EJBTransactionRolledbackException: javax.jms.JMSRuntimeException: Could not create a session: IJ000460: Error checking for a transaction
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:159) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:256) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:329) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [wildfly-ejb3-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
Caused by: java.lang.RuntimeException: javax.jms.JMSRuntimeException: Could not create a session: IJ000460: Error checking for a transaction
at org.wildfly.extension.messaging.activemq.deployment.JMSContextProducer$JMSContextWrapper.getDelegate(JMSContextProducer.java:234) [wildfly-messaging-activemq-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
at org.wildfly.extension.messaging.activemq.deployment.JMSContextProducer$JMSContextWrapper.createProducer(JMSContextProducer.java:267) [wildfly-messaging-activemq-7.0.1.GA-redhat-2.jar:7.0.1.GA-redhat-2]
Der Consumer (MDB) versucht, die empfangene Entity zusammenzuführen. Aber die Zusammenführung schlägt fehl, und auf Rollbacks erhalte ich einen Rollback:
javax.ejb.EJBTransactionRolledbackException: javax.jms.JMSRuntimeException: Could not create a session: IJ000460: Error checking for a transaction
Es scheint, dass JBoss EAP 7 ein Problem mit Session hat oder mit für eine Transaktion überprüft, da der Fehler sehr häufig auftritt. Könnte mir jemand helfen? Wenn Sie weitere Informationen benötigen, fragen Sie mich bitte.
Vielen Dank.