Je reçois beaucoup d'exceptions JMSRuntime lorsque j'envoie une entité à un sujet. Le conteneur JMSContext est géré par JBoss EAP 7. Voici le code d'envoi de l'entité au sujet et à la file d'attente. Je reçois beaucoup de stacktraces et mon fichier journal dépasse la limite de 30 Go en quelques heures:JBoss EAP 7.0 lève beaucoup d'exceptions JMSRuntime
@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());
}
}
Ceci est l'entité:
@Entity
public class MyChangeEntity implements Serializable {
private static final long serialVersionUID = 1L;
private long id;
private Instant created = Instant.now();
private Integer customVersion;
...
}
Et voici l'exception:
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]
Le consommateur (MDB) essaie de fusionner l'entité reçue. Mais la fusion échoue et rollback je reçois un RollBackException:
javax.ejb.EJBTransactionRolledbackException: javax.jms.JMSRuntimeException: Could not create a session: IJ000460: Error checking for a transaction
Il semble que JBoss EAP 7 a un problème avec la session ou la vérification d'une transaction parce que l'erreur se produit très souvent. Quelqu'un pourrait-il m'aider? Si vous avez besoin de plus d'informations s'il vous plaît demandez-moi.
Merci beaucoup.