Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blog Posts by Community

• Adopt a JSR  • Embedded  • GlassFish  
• Global Education and Learning  • Identity Management  • IoT  
• Java Communications  • Java Desktop  • Java Enterprise  
• Java Patterns  • Java Tools  • Java User Groups  
• Java Web Services and XML  • JavaFX  • JCP  
• JDDAC  • Jini  • JXTA  
• Mac Java  • NetBeans  • Open JDK  
• Portlet  • Robotics  • Sun Grid  
• Sun RFID and Sensor  • [no association]  


Java Tools

An essential part of a well-written unit test is a well-written assertion. The assertion states the behavior you expect out of the system. It should tell you at a glance what a test is trying to demonstrate. It should be simple and obvious. You should not have to decipher conditional logic or sift through for loops to understand what it is doing. In addition, any non-trivial logic in a test case...
on Jan 4, 2014
One day I found myself in the situation that I had to write a unit test which checks whether my code is annotated in a particular way. I wondered how one could do that without doing an integration test that actually processes that annotations. My first idea was to use the Reflection API, which in fact worked, but was not looking smart. In fact, I wanted to have a Hamcrest matcher instead, since...
on Dec 27, 2013

Java Enterprise

Why would you add a placeholder component to the tree using ui:component? Well, sometimes you need to add content dynamically, but you also need to be able sure where it ends up. Why would you need to know where it ends up? Well imagine the following scenario   <ui:component id="component1">    <ui:include rendered="#{myBean.include1Yes}"...
on Jan 2, 2014
Lets start with a small quiz: Can you find 3 differences in the pictures below? Yeah, you got it. That was an easy one. :) Surprisingly, implementing preview for extra asset types has been relatively simple as well. When coming up with the architecture of DAM, the Magnolia team chose to not generate previews and thumbnails of assets directly in the module, but rather delegate this functionality...
on Dec 31, 2013
In the most recently completed Java.net poll, developers suggested that, yes, they're aware of "Big Data" and its implications, but overall they're not all that surprised at what they're seeing in that area. A plurality of votes went to "It was bound to happen, given today's powerful computers, it's no big surprise"... A total of 135 votes were cast in the poll. The exact question and results...
on Dec 16, 2013
Occasionally, users have the need to override the version of JSF included in the application server by bundling a different version of JSF with their application. If you are trying to use CDI in such a scenario, you might have noticed it does not work. Is there a way out? Yes, there is, by including a small JAR and some configuration in your web application you can make this scenario work. Add...
on Dec 10, 2013
To make it possible to debug the view tree the JSF runtime has a debug component (ui:debug) that you can use. What is the best way to do this? Add the ui:debug component to the bottom of your page and activate it only in Development mode. This makes it available when the application needs to be debugged, but it does not put a burden on a Production application.   <ui:debug rendered=...
on Dec 9, 2013
How do you convert a date in JSF? The example below outputs the date using the long date style <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"      xmlns:h="http://java.sun.com/jsf/html"      xmlns:f="http://java.sun.com/jsf/...
on Dec 6, 2013
If you have ever wondered which version of Mojarra is running on the container you can determine what version is running using a simple piece of code. How? The following code snippet shows you how!   FacesContext.getCurrentInstance().getClass().getPackage().getImplementationVersion() And that is it. Enjoy!
on Dec 4, 2013
Hurray, 50 JSF tips! For your convenience I have prepared a JSF tips bitly bundle that links back to them all. See http://bitly.com/bundles/o_7q05ovp05f/2 And that is it. Enjoy!
on Dec 3, 2013
Ever wondered how you would use a composite component within a composite component? Or is it not possible? It most certainly is possible, so lets see how! First we define level 2 (the deepest nesting) <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"      xmlns:h="...
on Dec 2, 2013

Open JDK

There are mainly two ways by which one may reuse classes in Java. The first is by way of composition. Composition provides a way to compose your classes from objects of existing classes, essentially making use of the objects' functionality as opposed to its form. The second method is by what we call inheritance, which describes how one may derive a new class as a type of an existing class. With...
on Dec 18, 2013
A key consideration for the library designer in the normal conduct of operations is maintaining the ability to make changes or improvements to the library at any time without requiring the consumers (client programmers) of that library to do the same. In Java, a library consists of a logical grouping of .class files packaged together to make a working program. An apt analogy to this point may be...
on Dec 8, 2013

Java Desktop

Just recently I was engaged to assist with an application that wasn’t behaving. The application, running in a 1.7.0_45 JVM, relied heavily on a 3rd party SAAS framework. That vendor provided my client with a list of 26 different JVM flags that should be set. When faced with this long list of flags I couldn’t resist asking why all the flags and why these flags. After all there are more than 700...
on Dec 11, 2013
The data warehouse is essential to enterprise business intelligence, which accounts for a great part of the total enterprise cost. With the global data explosion in recent years, the business data volume grow significantly, posing a serious challenge for enterprise data warehouse to meet the diverse and complex business demands. More data, more data warehouse applications, more concurrent...
on Dec 11, 2013
Tired of JavaFX Scene Builder being run in a separate process? Fed up with no real integration between your favorite IDE and JavaFX Scene Builder? There may be a solution heading towards you. Follow this small series of blog entries to join me on my journey towards an embedded JavaFX Scene Builder in NetBeans. Welcome back (you did read the first part of this series?)! Ok, having done a bit of...
on Dec 7, 2013
Recently I have come upon a blog article which discussed why Swing has to be Deprecated.  My understanding of the author's argument was that since Swing looks ugly compared to HTML5 and nobody uses Swing anymore that it should be deprecated in favor of JavaFX.  The theory was that by deprecating Swing and forcing users to upgrade to JavaFX then all Java GUIs will be better with the...
on Dec 2, 2013
Tired of JavaFX Scene Builder being run in a separate process? Fed up with no real integration between your favorite IDE and JavaFX Scene Builder? There may be a solution heading towards you. Follow this small series of blog entries to join me on my journey towards an embedded JavaFX Scene Builder in NetBeans. Finally, with the new developer preview builds of JavaFX Scene Builder 2.0 a new...
on Dec 1, 2013

Global Education and Learning

This post presents the completion of the light weight surveillance and security framework that I wrote for the express purpose of teaching actor programming techniques available with Java and the Akka actor framework. Complete running code is available for study and/or as a base for your own project. While the project is nominally about software to surveill and secure complex premises such...
on Dec 9, 2013

Java Web Services and XML

I was very pleased to see the JFrog team take me up on my suggestion early this year that "Maybe the JFrog team will consider giving a presentation on how they put all this together at JavaOne this September". Unfortunately for me, the session (Building a Massively Scalable Cloud Service from the Ground Up) was already filled to capacity as I walked up to the door, so I was unable to attend....
on Dec 8, 2013