• Calling a JMX Bean method in JBoss with an example of clearing JMS Queue
    Dec 13, 2011

    I needed to empty one JMS (Java Message Service) queue in JBoss 4.2.2, but I found out that JMS does not have a standard way to delete messages and empty the queue, and emptying a queue is provider-dependent operation. So I figured out that in JBoss 4.2.2 I will need to call removeAllMessages() method from Management Bean (MBean) that is associated with the queue that we want to empty. So here are the steps:

  • @Override annotation in Java 5 vs 6
    Aug 23, 2011

    I was porting a Java 6 project to Java 5 today due to requirements, and I came up with a feature difference that I was not aware of before. @Override annotation was introduced in Java 5 to mark methods that have to override methods from superclass, and to give compiler error when such overrides do not occur. However only since Java 6 you can use @Override in order to mark methods that implement the methods from interface, thus putting @Override in a method that implements method of the interface, will result in compile error in Java 5. It was somehow forgotten to be put in Java SE 6 API documentation, but was promised to be fixed in Java 7 API documentation. Blog entry from Oracle: http://blogs.oracle.com/ahe/entry/override_snafu

  • Lazy Generification
    Jul 14, 2011

    Every developer had faced a dilemma of whether making something generic for a better code design, or not wasting time on it. And even though theoretically there are many guidelines how to effectively write generic code, there are some visible failures done about it. For example, had someone ever seen any other type of Servlet other than HttpServlet?

  • Uninstalling Eclipse plugins from Eclipse 3.6 Helios
    May 20, 2011

    For some reason Eclipse decided to make it non-straightforward to uninstall plugins, there is no big button telling "Uninstall Old Software" similar to "Install New Software". Thus it becomes a bit tricky to remove installed plugins.

  • How NOT to write code examples in programming books
    May 16, 2011

    I am currently reading Java Web Services: Up and Running (Amazon), and only after reading a chapter I am amazed how horrible the code examples are. The code examples for the book can be downloaded from here.

  • Configuring Glassfish plugin in Maven
    May 11, 2011

    Today I had a problem with glassfish plugin for maven failing to deploy/redeploy my project, giving the following error:

  • How I passed SCJD/OCMJD
    Mar 29, 2011

    At the end of last year I finally decided to register for Oracle Certified Master. Java Developer certification, do the assignment and hopefully pass it. I was "lucky" at that time that projects at my work position got stalled, so there was nothing to do, and I had a lot of time to do my own things. I tried to not lose that time but to use it to quickly developed OCMJD project and I am satisfied with my results, since I passed the certification in relatively short time. Here is my short timeline:


subscribe via RSS