Arquillian, JBoss’ foray into providing in-container testing for Java EE projects, could be used to give Java EE container developers the ability to test their containers using a set of tests based on expected Java EE behavior. Such tests will enable developers of the next generation of application servers to not only run unit and integration tests on their contains but can be used to ensure compliance with the Java EE spec. It would be especially useful for integration testing where different frameworks are developed in isolation leading to integration issues when it gets out to the public.
In an ideal world, the Java EE vendors could get together and share a common open set of tests to ensure that they are all following the same rules of the spec, almost like an informal TCK. Having such a set of tests would ensure higher quality application servers are turned out in a faster time. Going from Java EE 5 to Java EE 6 was quite a big leap, I don’t think anyone is expecting as much of a leap from Java EE 6 to 7 or 8, so now would be a good time to consider those options.
This is one of those things where everybody gains. All the vendors get the benefits of product improvement due to the unit tests and they all get the benefits of Java EE having a better reputation as a solid, portable framework with more timely releases.
In part 1, we created a simple application that made use of string resource bundles in JSF and in part 2 we extended it by using CDI to inject the resource provider into beans so we can re-use our code for accessing locale specific string based resources.
Read More »
Happy 2011! Well, I’m back from the Christmas break. I had a lot going on last year so took some time out. If you posted an email or comment, I’ll get back you this week.
I spent a month working on a 3D terrain rendering engine that provides real time terrain and texture generation and can be used for ‘infinite’ terrains in real time at 100fps.It also uses multithreading to generate the terrain patches and shading so it can maintain frame rates while it fills in the geometry and shading information. If I find time to clean it up I may end up releasing it as it is part of a personal graphics library I use and I have some other mini-projects based on it such as a particle engine. Actually, I may end up incorporating the particle engine in with the OpenGL engine that the terrain engine uses. I often find I want to play around with some graphics based ideas and then need to spend time creating the boilerplate just to try them out. This way all the basics are in one place and I can just summon the libraries and code I need from Maven.
I’ve also got a couple of enterprise Java posts up my sleeve, and at the end of last week, I had a bit of an epiphany regarding some of my practices with the CDI and getting it to work with other frameworks, including in the Knappsack archetypes. I need to investigate it a little more but I think I’m on the right track.
As for blogging, this year I plan to add a couple more foodie related posts. My wife and I are fairly big foodies and we like to try out different recipes now and then, and since I use my blog to remember things that I normally would forget, like recipes, I’ll probably blog about them. Currently, I’ve been playing with the dutch oven I got for Christmas, and had great success with Short Ribs and Chuck Steak, some of which got made into pasties for the New Year with homemade shortcrust pastry. In the summer, I’ll probably cover my BBQ escapades.
JBoss has put out a CR1 release for JBoss 6.0 which implements the Java EE 6 specification. I don’t normally cover product releases, but I thought I may as well mention it since nobody else has (not even their blog). I only found out when I was sniffing around in their Maven Repositories and found the CR1 version of things. You download the latest from the JBoss download site.
In this post we looked at adding String resource bundles to our JSF applications to move our string constants into external resources that we can define for different locales. Now I want to extend that example to show how you can expand on that by using injection to access those resources.
Read More »
Setting up resource message bundles in JSF to provide multilingal messages and captions is often overlooked when first creating an application. Leaving it till later in the project means you will have to go back and manually change the constants over to resource based values. Resource bundles JSF 1.2 were far from perfect but fortunately, using resource bundles in JSF 2.0 is very easy and this tutorial will show you how to add bundles and use them in your JSF 2.0 pages.
Read More »
Read More »
After my wife being in hospital for a month, she finally gave birth to Amy Louise Gibson who was born on 29th October 2010 at 9:01pm weighing 6 lbs, 5oz, and 18.5 inches long.
Not only is this the third October birthday in our house (my son Michael is on the 24th and I’m on the 18th), but this is the first girl born on my mine and my dads side of the family in 4 generations.
As a result, I’ll be a bit tied up for the
20 years next few days, so email and comment responses might be slow coming,
The @Alternative CDI annotation allows you to have multiple matching dependencies for a given injection point. This means you can define beans that provide implementations for the same interface without worrying about ambigious dependency errors. When you mark a class with the @Alternative annotation, it is effectively disabled and cannot be considered for injection. The only exception is for the class that is defined in the
beans.xml configuration file.
Once this bean is identified, it is then used in any injection point that matches for this bean. No other beans for similar injection points can be declared as the ‘active’ alternative.
Alternative is really an odd name for it, but all it does is disable the bean while adding it to the
beans.xml file enables it and makes it available to CDI.
This tutorial looks at how JSF makes it easy to create a dynamic list of checkboxes that can be used to select values on the server.
Given a list of strings, we want to display the list of values, each with a check box and be able to select or deselect that item from inclusion in the selected set. We want to do it without having to manually add each checkbox to the page and bind it to a property on the backing bean.
Read More »