Skip to content
Advertisement

ActiveMQ get queue size without using JMX, JMS

I need a way for getting queue size in ActiveMQ without using JMX or Iterate all queue using JMS. Is there any solution for getting queue size using ActiveMQ API. Answer There is no API in JMS for querying the broker for stats, that goes against the concept of decoupling the client from each other and the intermediate broker. ActiveMQ

Initialize list if list is null with lombok getter?

I am currently replacing all my standard POJO’s to use Lombok for all the boilerplate code. I find myself keeping getters for lists because I want to return an empty list if the list has not been initialized. That is, I don’t want the getter to return null. If there some lombok magic that I’m not aware of that can

Java on RISC-V ISA

After much searching, I have not found a JVM that runs on the RISC-V ISA. This seems critical for adoption. It is difficult to see selling a RISC-V server, or tablet, or even a smart TV, without a working Java implementation. It feels like something that the community should to come together and work on. I am willing to pitch

How to format date/time string? (Java)

Hi can anyone help please? I am trying to format a date and time string. Currently it looks like this “20160112T110000Z” and I need it to be “2016-01-12T11:00:00Z” The string without the special characters are returned from a 3rd party recurrence library. I need to convert it to have the special characters before parsing it to a Calendar object. Can

Eclipse JUnit 5 support

Currently, JUnit 5 is just out with a “stable” version. IntelliJ supports JUnit 5 according to the Website. My question is if eclipse is supporting JUnit 5 as well, and if not when it is going to be supported. With supported I mean if I can run JUnit 5 tests without the need for a @RunWith(PlatformRunner.class) annotation. EDIT October 2017:

Spark (JAVA) – dataframe groupBy with multiple aggregations?

I’m trying to write a groupBy on Spark with JAVA. In SQL this would look like But what is the Spark/JAVA style equivalent of this query? Let’s say the variable table is a dataframe, to see the relation to the SQL query. I’m thinking something like: Which is obviously incorrect, since you can’t use aggregate functions like .count or .max

PlotOrientation of BoxAndWhiskerChart JFreeChart

I have a question about JFreeChart: Is it possible to change the PlotOrientation of a BoxAndWhiskerChart to horizontal? I have a histogram, and I want to add a BoxAndWhiskerChart below. I need it horizontal so I can use the same axis scale. I tried to change the orientation in the Plot and ChartPanel. Answer @Catalina Island shows the correct way

Advertisement