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
How to set initial value for @Id @GeneratedValue in Spring JPA for MySQL?
I can not figure out how to set the initial value for the @GenerateValue @Id. I have tried using GenerationType.SEQUENCE but that is not allowed in MySQL. How can I set the initial value to be used for the @GenerateValue? Using both AUTO and TABLE I can still not get the initial value to start at anything but 1 Thank
Eclipse plug-in: Custom plugin.xml like editor
I’ve been trying to mimic the plugin.xml editor in my own Eclipse plug-in. I want a graphical editor for a custom file type. The same way in which PDE has a specific form/editor to open plugin.xml. From what I understand I can implement a text Editor and link a file type to open in a particular editor. To add a
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
How to change a default charset for Java machine in Eclipse?
I am finding any elegant method, how can I change default charset of Java machine to UTF-8 in Eclipse. I have found many methods, how to do from source code, but I would like to know, how to do it fast, easy, from Eclipse IDE without writing java source code. Thanks. Answer You can change the workspace default encoding for
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