• Home
  • RSS Feed
  • Register
  • Log in

Archive for the ‘Java’ Category

Older Entries

J(2)ee, the basics and beyond
Posted by Sander Hautvast at around evening time: June 30th, 2009

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.

(more...)

  • Bookmark

Filed under Concurrency Control, Java, Middleware, websphere | 3 Comments »

Web performance in seven steps; step 3: test representatively
Posted by Jeroen Borgers at around evening time: June 29th, 2009

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...)

  • Bookmark

Tags: JMeter, Performance, Testing, Tools
Filed under Java, Performance, Quality Assurance, Testing, Tools | No Comments »

Open Letter to Geertjan Wielenga
Posted by Wilfred Springer mid-morning: June 26th, 2009

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.

(more...)

  • Bookmark

Tags: fluent interface, Java, netbeans
Filed under Java | 11 Comments »

Pecia: Towards a Fluent Interface for Building Documents
Posted by Wilfred Springer in the early morning: June 25th, 2009

1. Introduction

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.

(more...)

  • Bookmark

Filed under Java | No Comments »

@Composite - Macro Annotations for Java
Posted by Andrew Phillips in the early morning: June 23rd, 2009

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...)

  • Bookmark

Tags: annotation, composite, Java, macro
Filed under Java, Spring | 4 Comments »

JavaOne 2009
Posted by Wilfred Springer mid-morning: June 22nd, 2009

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...)

  • Bookmark

Filed under Java, JavaOne | No Comments »

JPA implementation patterns: Mapping inheritance hierarchies
Posted by Vincent Partington in the early evening: June 21st, 2009

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:

  1. InheritanceType.SINGLE_TABLE - The whole inheritance hierarchy is mapped to one table. An object is stored in exactly one row in that table and the discriminator value stored in the discriminator column specifies the type of the object. Any fields not used in a superclass or a different branch of the hierarchy are set to NULL. This is the default inheritance mapping strategy used by JPA.
  2. InheritanceType.TABLE_PER_CLASS - Every concrete entity class in the hierarchy is mapped to a separate table. An object is stored in exactly one row in the specific table for its type. That specific table contains column for all the fields of the concrete class, including any inherited fields. This means that siblings in an inheritance hierarchy will each have their own copy of the fields they inherit from their superclass. A UNION of the separate tables is performed when querying on the superclass.
  3. InheritanceType.JOINED - Every class in the hierarchy is represented as a separate table, causing no field duplication to occur. An object is stored spread out over multiple tables; one row in each of the tables that make up its class inheritance hierarchy. The is-a relation between a subclass and its superclass is represented as a foreign key relation from the "subtable" to the "supertable" and the mapped tables are JOINed to load all the fields of an entity.

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...)

  • Bookmark

Filed under Hibernate, JPA, JPA implementation patterns, Java | 3 Comments »

Dangerous new Language Features: Indexing access syntax for Lists and Maps
Posted by Maarten Winkels in the late afternoon: June 20th, 2009

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...)

  • Bookmark

Tags: Indexing access syntax for Lists and Maps, jdk7, project coin
Filed under Java | 28 Comments »

Web performance in seven steps; step 2: Execute a proof of concept
Posted by Jeroen Borgers at around evening time: June 15th, 2009

Last week I blogged about setting your performance goals: defining your requirements. This time I'll blog about the importance of a Proof of Concept for performance.

The IT world is very sensitive to trends. Having been around in the IT industry for 15 years, I’ve seen a few. A technology is hot for a while, and then quickly becomes out-of-fashion and yesterdays news. It will be replaced by something which is much better and what everyone follows almost blindly.
(more...)

  • Bookmark

Tags: Architecture, Java, Performance
Filed under Architecture, Java, Performance, Quality Assurance, Requirements Management, Testing | No Comments »

JPA implementation patterns: Field access vs. property access
Posted by Vincent Partington around lunchtime: June 13th, 2009

Last week my colleague Albert Sikkema blogged about using UUIDs as primary keys. Interesting stuff, thanks again, Albert! This week I will continue the JPA implementation patterns series by discussing the relative merits of field access vs. property access.

The JPA specification allows two ways for the persistence provider to access the persistent state of an entity. The persistence provider can either invoke JavaBeans style property accessors (getters and setters) or access the instance fields of the entity directly. Which method is used depends on whether you have annotated the properties or the fields of an entity.
(more...)

  • Bookmark

Filed under Hibernate, JPA, JPA implementation patterns, Java, Performance | No Comments »

Older Entries


Archives

  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008

Xebia Sites

  • Xebia Corporate
  • Xebia France
  • Xebia India

Categories

  • Java (233)
  • Agile (100)
  • General (50)
  • Performance (37)
  • Hibernate (35)
  • Podcast (31)
  • Testing (30)
  • Scrum (27)
  • Spring (24)
  • Project Management (22)
  • Architecture (22)
  • SOA (19)
  • Flex (17)
  • Maven (15)
  • Eclipse (14)
  • JPA (13)
  • Quality Assurance (12)
  • Groovy (12)
  • Articles (11)
  • Grails (11)

Tag Cloud

    Ajax Semantic Web Agile Agile Awareness Workshop OutOfMemoryError offshore fitnesse Performance Java qcon Maven Hibernate Closures Testing plugin Poppendieck Seam Xebia Scrum Grails Groovy Eclipse distributed offshoring IntelliJ sutherland Introduction to Agile JavaOne Lean SOA