mardi 31 mars 2015

How to initialize SystemUsage of ActiveMQ with spring-boot?

I'm trying to initialize embedded activemq JMS using spring-boot. It works in general, but I want to also lower the memory usage. Therefore I'm trying to provide the SystemUsage as a bean.


But the SystemUsage bean is not taken into account and the activemq embedded has still the default configuration of 1GB . What might be wrong?



@EnableAutoConfiguration
@EnableJms
public class AppConfig {
@Bean
public SystemUsage systemUsage() {
MemoryPropertyEditor editor = new MemoryPropertyEditor();
SystemUsage system = new SystemUsage();

MemoryUsage memory = new MemoryUsage();
editor.setAsText("20mb");
memory.setLimit((long) editor.getValue());
system.setMemoryUsage(memory);

return system;
}
}

Aucun commentaire:

Enregistrer un commentaire