In this series I want to address some topics that are old and well known, but still seem to puzzle developers and administrators in a j2ee environment. Think of anything in or around an application server. When talking of application servers I mostly refer to websphere. Sadly I have no real experience using any other. Yet I aim to keep a broad perspective, not to narrow the audience. The level should be beginner to intermediate.
Part1 Starting your own threads.
As long as I worked with application servers, people have always told me not to start my own threads, because the j2ee specification states that this is forbidden. These threads are also referred to as 'naked' and 'unmanaged'. The danger they pose is doing things that the application server knows nothing about. It could cause resource leaks, no debugging, failing to stop a server or security problems.
Yet there is a number of open source frameworks that do just this, and no one seems to object. Think of quartz, or Log4j (the watchdog that monitors changes in log4j settings). And even the jdk itself is guilty: use of java.util.Timer also causes so called unmanaged threads.
Filed under Concurrency Control, Java, Middleware, websphere | 3 Comments »
Last week I co-organized an nlscrum event with a very special guest: Jeff Sutherland. After rushing with him from the airport to our Xebia office, Jeff gave a very inspiring presentation.
Tags: Agile, Scrum
Filed under Agile, Scrum | 1 Comment »
Last time I blogged about the importance of benchmarking the architecture and new technology in a Proof of Concept for Performance. This time I’ll deal with the importance of representative performance testing.
Slowness of applications in development environments is often neglected with the rationale that faster hardware in the production environment will solve this problem. However, whether this is really true can only be predicted with a test on a representative environment and in a representative way. In such an environment, there needs to be more representative than just the hardware.
(more...)
Tags: JMeter, Performance, Testing, Tools
Filed under Java, Performance, Quality Assurance, Testing, Tools | 1 Comment »
Geertjan Wielenga has been trying to pull me back into the NetBeans community for a couple of years in a row now. I admire his perseverance; if this is typical for the whole NetBeans team, then Eclipse is going out of the window some day soon.
Tags: fluent interface, Java, netbeans
Filed under Java | 11 Comments »
There is a chance that - after having read this article - you conclude that nobody in a sane state of mind would ever use what this article is going to suggest. Let me therefore start with disclaimer: I have never made any public claims regarding my state of mind.
Apart from that, I figure an article about a technology almost nobody is using, is still way more interesting than an article everyone is using. In fact, I guess the more senior you are, the more things you have already seen before, the less likely it is you will be you will be interested in something people already did many times before. Based on that, you might as well say that the most experienced people around will probably be interested in stuff that nobody is using. This article is for those people.
With that out of the way: Pecia is a new way of generating documentation from your Java applications. You will probably wonder why we need yet another way of generating documents from Java, and I have to admit that the Java world is not in a bad shape if it comes down to the number of frameworks allowing you to generate documents. However, Pecia takes another stab at it, and I just had to see if it would work. You be the judge whether it makes sense.
Filed under Java | 2 Comments »
Introduction
Visual aspects of a portal have a significant impact on the quality of user experience and, thus, indirectly on the success of the portal. The look and feel of the portal should be appealing and unique. Most of the times look and feel provided by the portal server does not serve the purpose. Hence, most of the portal servers provide mechanism to customize the look and feel of the portal. In Websphere portal, themes and skins provide the mechanism to customize the look and feel of the portal for an enhanced user experience. (more...)
Filed under websphere | 1 Comment »
Some months ago I attended a presentation at which Wilfred Springer demonstrated his very cool Preon binary codec library. Defining binary file formats in Preon requires quite a lot of fairly repetitive sets of annotations, and during a chat after the talk Wilfred mentioned (in fact, he blogged about it) how much more convenient it would be if one could just define "shortcuts":
@RequiredEnumProperty(column = "AGENT")
for
@NotNull @Column(name = "AGENT") @Enumerated(EnumType.STRING)
for instance - and use those instead. Sort-of "macro annotatations" for Java, if you like.
A thought that has presumably also occurred to many frequent users of Hibernate, JAXB or other annotation-heavy frameworks.
Well, it took me rather longer than the couple of days it would probably have taken a developer of Wilfred's skill, but finally @Composite is here! (more...)
Tags: annotation, composite, Java, macro
Filed under Java, Spring | 6 Comments »
Two weeks ago, I presented Spring ME at JavaOne. It was an interesting conference in more than one way. Some things were just plain surreal. Larry Ellisson calling onto the OpenOffice community to work on integration of JavaFX? What was that all about? And I haven't seen the official numbers yet, but the number of attendees must have been an all-time low. Same with the number of parties.
Nevertheless, I have to say I had a marvelous week. Despite the economic slow-down, the quality of the talks was great, and it surely doesn't seem to have prevented people from exploring new ideas. From my perspective, the big topics were Java FX (largely Sun pushing), Cloud Computing (lot of vendor push, quite some traction behind it, very little convergence) and other languages on the VM (mostly based on traction from the community).
In summary, I would say that there is pretty widespread agreement that multi-core and cloud computing have exposed some of the weaknesses of the traditional VM, language and enterprise architectures. However, Java is certainly not dead, and it is not going to anywhere soon; instead, it's very much alive and kicking. However, there are quite a few different perspectives on how Java should evolve from all of this. And since a significant bit of the platform is driven by the community, the shake-out of these different opinions will take some time. Nevertheless, all of these initiatives are surely promising, and there seems to be a strong commons sense of avoiding ceremony. I'm sure something good will come out.
The rest of this entry are just some of the highlights I picked from my notebook.
(more...)
Filed under Java, JavaOne | No Comments »
Last week I discussed the relative merits of field access versus property access in the ongoing JPA implementation patterns blog series. This week I will dwell on the choices offered when mapping inheritance hierarchies in JPA.
JPA provides three ways to map Java inheritance hierarchies to database tables:
A nice comparison of the JPA inheritance mapping options with pictures, and including a description of the @MappedSuperclass option, can be found in the DataNucleus documentation.
Now the interesting question is: which method works best in what circumstances?
(more...)
Filed under Hibernate, JPA, JPA implementation patterns, Java | 5 Comments »
In this blog I'll talk about a new language feature proposed for Java7 by project coin and the problems I see with it.
Maybe it is time to buy those Scala books and take a deep dive...
(more...)
Tags: Indexing access syntax for Lists and Maps, jdk7, project coin
Filed under Java | 29 Comments »