Skip to main content

Java News

April 22, 2014 -

[article] In an effort to make a meaningful application on the DukeScript Framework, here's the start of a JPA-based CRUD app (right now, only R is supported)... There are three parts to this. Model. I generated JPA entity classes from my database. I ended up with the "Customer" class, which has relationships with "DiscountCode" and "MicroMarket". Then I added...

April 22, 2014 -

[article] The third edition of David Heffelfinger's Java EE book has been recently released. This updated edition is covering the latest version of the Java EE Platform, i.e. Java EE 7. The book gives a wide introduction on the Java EE Platform and its major APIs in their latest version... The book also covers 2 of the APIs introduced in Java EE 7 : the WebSocket API and JSON-P...

April 22, 2014 -

[article] This is the second in a series of blogs on Tomcat, including basic set-up and clustering, configuration and finally performance tuning and monitoring. Following on from my colleague's blog post looking at basic set-up and clustering, in this blog post I will take a look at some basic configuration settings and some key things most people want to configure. This blog will use the system set up in the first part of this series...

April 21, 2014 -

[article] The Heartbleed Bug has received significant attention lately and has reignited discussions regarding open source security issues and open source quality issues. The article "Heartbleed: Open source's worst hour" goes so far as to open with the sentiment that Heartbleed is "open source software's biggest failure to date." In the midst of this discussion, the Coverity Scan 2013 Open Source Report has been released and provides another interesting source of input for the discussion...

April 21, 2014 -

[article] Runtime type information (RTTI) refers to the correct identification of the type of your objects at run time. When you write code, it is generally desirable to do so in a way that takes advantage of OOP features like encapsulation and inheritance to make your program easily extensible, by for instance, as much as possible manipulating references to base classes and letting polymorphism work for you. Essentially, when you create a new object with a base class reference, the process necessarily involves...

April 21, 2014 -

[article] Oracle User Group Norway - Spring Seminar: The OUGs are not the typical place for Java developers or community managers (namely me) to be. But OUGN has been working hard to build out a decent Java track with very good speakers, and it was a chance to see how the broader Oracle community is working together when it comes to Java. The Spring Seminar is another special conference venue held on a cruise ferry going from Oslo, Norway to Kiel, Germany and back, while keynotes, sessions, networking and fun are ongoing...

April 20, 2014 -

Inaugural JavaLand in Germany: It took trains, planes, and automobiles to get there. I had heard Germany ran some great conferences, but JavaLand was promised to be outstanding. Kevin already did an interview with one of the organizers, Markus Eisele, about why JavaLand is different (https://weblogs.java.net/blog/editor/archive/2014/03/01/java-conferences...) But I got to see first-hand if they deliver. The conference...

April 20, 2014 -

Last week, I took some days off to attend Devoxx France 2014 3rd edition. During this year’s edition, my revelation came from a 15 minute talk by my friend Alexandre Victoor, who introduced me to the wonders of Mutation Testing. Since I’m currently writing about Integration Testing, I’m very much interested in Testing flavors I don’t know about. Experienced software developers know not to put too much faith in code coverage metrics. Reasons include...

April 20, 2014 -

When we write automated tests (either unit or integration tests) for our application, we should notice pretty soon that: many test cases use the same configuration which creates duplicate code; building objects used in our tests creates duplicates code; and writing assertions creates duplicate code. The first thing that comes to mind is to eliminate the duplicate code. As we know...

April 17, 2014 -

[article] With so much happening around the Java platform, it’s understandable if you missed the recent improvements we made to the Secure Coding Guidelines for Java SE. In January 2014 the Java Platform Group released a significant update, Java 7 Update 51 establishing code-signing as the default for Applets and Web Start applications. In March 2014, we hit another major milestone with the long anticipated release of Java SE 8. There are a number of improvements to the Secure Coding Guidelines for Java SE...

April 17, 2014 -

[article] A few days ago the second beta of Groovy 2.3 got released. One of the major new Groovy 2.3 features are traits. A trait is a reusable set of methods and fields that can be added to one or more classes. A class can be composed out of multiple traits without using multiple inheritance (and therefore avoiding the diamond problem). The following piece of code shows a basic definition of a trait in Groovy 2.3...

April 17, 2014 -

[article] Rakuten is one of the largest e-commerce platforms in Japan and perhaps the world. They chose GlassFish to form a core of their extensive (24 X 7) platform (they also use Oracle Coherence). Makito Hashiyama, the lead for the Rakuten marketplace platform shared their adoption story at the JavaOne 2013 Sunday GlassFish community event - check out the video below...

April 16, 2014 -

[article] I just lOvE new toys, and Java 8 has a bunch of them. This time around I want to talk about one of my favourites – concurrent adders. This is a new set of classes for managing counters written and read by multiple threads. The new API promises significant performance gains, while still keeping things simple and straightforward....

April 16, 2014 -

[article] In this interview (originally published in German in Eclipse Magazine), Martin Lippert, Principal Software Engineer at Pivotal Inc talks about the latest Java release, and the ups, downs, and aspirations of Eclipse IDE development. JAX: What are the highlights of Java 8 for you? Lippert: The special highlight for me in Java 8 is certainly the lambda expressions. With them, code can be written simpler and clearer and many of the troublesome Inner classes are finally gone...

April 15, 2014 -

[article] As a UI framework developer it is part of my job to provide ways to customize the appearance and behavior of my controls. In many cases this is done by allowing the framework user to register a factory on a control. In the past I would have created a factory interface for this and provided one or more default implementations within the framework. These things are done differently in JavaFX and...

April 15, 2014 -

[article] One of the first things many developers new to Java learn about is Java's basic primitive data types, their fixed (platform independent) sizes (measured in bits or bytes in terms of two's complement), and their ranges (all numeric types in Java are signed). There are many good online resources that list these characteristics and some of these resources are the Java Tutorial lesson on Primitive Data Types, The Eight Data Types of Java, Java's Primitive Data Types, and Java Basic Data Types...

April 15, 2014 -

[article] CDI events are a very powerful feature that enable loose coupling in a very simple and type-safe way. One aspect of CDI events that surprises many folks is the fact that they are synchronous rather than asynchronous. The surprise is perhaps fairly natural as similar event systems are usually asynchronous. Piotr Nowicki explores the issue in a very well thought out post exploring the various options for making CDI events asynchronous using plain Java EE features such as...

April 14, 2014 -

[article] Attention to new features in JDK 8 has rightfully been largely focused on new language features and syntax. However, there are some nice additions to the libraries and APIs and in this post I cover four new methods added to the BigInteger class: longValueExact(), intValueExact(), shortValueExact(), and byteValueExact(). All four of the newly introduced "xxxxxExact()" methods throw an ArithmeticException if ...

April 14, 2014 -

[article] "We love working with JDBC" Said no one. Ever. On a more serious note, JDBC is actually a very awesome API, if you think about it. It is probably also one of the very reasons Java has become the popular platform it is today. Before the JDK 1.1, and before ODBC (and that’s a very long time ago), it was hard to imagine any platform that would standardise database access at all. Heck, SQL itself was hardly even standardised at the time and along came Java with JDBC, a simple API with only a few items that you have to know of in every day work......

November 17, 2013 -

I have often wondered, why the team around Brian Goetz has been heading towards a “decent compromise” so strongly from the beginning, both from a marketing AND technical point of view, instead of adding more boldness to how Java 8 is advertised. At Devoxx Belgium 2013, Brian Goetz seems to have really sold his accomplishments completely under value...