Kontakt

Archive for the ‘Uncategorized’ Category

Hibernate Doesn’t Support UNION in HQL: Bug Open since 2005

Freitag, August 6th, 2010

It’s unbelievable. Today I came across a bug in Hibernate which is known since 2005 and still is not fixed. Hibernate does not support UNION in HQL. I experienced this bug couple of years ago and can’t believe it is still not fixed. If you browse the Hibernate JIRA you will find out that this bug is the most popular one with 104 votes. I can imagine that resolving this bug is not trivial but aren’t Hibernate guys paid by JBoss for coding Hibernate?

Speaking slot at Jazoon 2010 changed

Sonntag, Mai 30th, 2010

The Jazoon program committee moved the speaking slot for my talk JavaServer Faces 2.0 vs. Tapestry 5 from 13:30 t0 11:30. I’ll be speaking Thursday, 3 June 2010, 11:30-12:20 at Arena 7. More details can be found here.

See you there!

New Tapestry Logo

Montag, Mai 17th, 2010

I’m pleased to present a new Tapestry logo. The Tapestry Team decided to replace the old logo which represented Tapestry for years.

Tapestry Logo

The new logo emphasizes Tapestry’s strengths: power, speed, innovation, coolness and fun.

Tapestry Ferrari .

Wait. Don’t hold your breath. Tapestry wasn’t acquired by Ferrari. It’s just a joke created by a fellow worker Sebastian. I like it very much and going to use it in my presentations to animate the attenders. Do you like it?

Tapestry Talk at ruhrjug

Montag, April 26th, 2010

ruhrjugOn Monday, May 10th I’ll be speaking at ruhrjug in Essen, Germany. I’ll be presenting Tapestry 5 in a 90 minutes talk. As always I’ll give a lot of demos and show the innovative approach to build web applications in Java. Probably I’ll give a short preview of my upcoming JavaServer Faces 2.0 vs. Tapestry 5 talk. Looking forward to meet some Tapestry folks at ruhjug.

Jazoon 2010: Program Schedule Is Online

Montag, April 19th, 2010

The Jazoon 2010 Program Schedule is now online. I will be speaking Thursday, 3 June 2010 at Arena 7. The presentation starts 1:30 pm directly after the lunch break. Hope to see you there.

The programm looks very interestibng. Here are some of the presentations I’m going to attend:

Blueprint – Modern Dependency Injection for OSGi

Do you really get class loaders?

GPars: Parallel programming concepts for the JVM in Groovy

Cloud Computing with Scala and GridGain

Spring 3.0 – Themes and Trends

Spring ROO – A New Level of Enterprise Java Productivity

And of course the Jazoon Party. See you there!

Contribution Methods: Naming Conventions vs Annotations

Freitag, März 5th, 2010

One of the most powerful concepts of Tapestry IoC is distributed configuration. Every service can have a configuration which can be created across several IoC modules of an application. When a service instance is created all modules are scanned for contribution methods. A contribution method is a module method whose name consists of the prefix contribute and a service id. The service id is used to identify the service to contribute into. There are three different styles of configurations:

  • Unordered Configuration of type java.util.Collection
  • Ordered Configuration of type java.util.List
  • Mapped Configuration of type java.util.Map

When creating a service instance the registry creates an empty configuration and passes it to all the available contribution methods for the service. In the following example you can see a contribution method for the service with the id ApplicationDefaults.

public class AppModule {

   public static void contributeApplicationDefaults(
         MappedConfiguration<String, String> config) {

      config.add(SymbolConstants.PRODUCTION_MODE, "false");
   }
}

This approach works fine because a service id is unique inside the service registry. But identifying services by string ids is often error prone. First if you want to contribute to a configuration of a service you need to know the id of the service. For this purpose you have to look into Tapestry sources or call the ServiceStatus page. Second if you refactor your application and rename an id of a service, your contribution won’t work anymore.

As of version 5.2 (I committed the code today) the annotation @Contribute can be used as an alternative for naming convention for contribution methods. The annotation may be placed on an arbitrary named method of a module to identify this method as a contribution method. The value of the annotation is the type of the service to contribute into. The following example is an alternative for the contribution method above. Note that service with id ApplicationDefaults is of type SymbolProvider.

public class AppModule {

   @Contribute(SymbolProvider.class)
   public static void arbitraryName(
         MappedConfiguration<String, String> config) {

      config.add(SymbolConstants.PRODUCTION_MODE, "false");
   }
}

What if you have several implementations of a service interface? For example Tapestry provides several instance of the service SymbolProvider. In this case you have to disambiguate the service instances with marker annotations. In Tapestry the services ApplicationDefaults and FactoryDefaults are marked with annotations @ApplicationDefaults and @FactoryDefaults. We need to modify our contribution method a little bit in order to identify the service to contribute into. For this purpose the @Marker annotation should be placed on the contributor method. The value of the annotation is the class of a marker annotation which was used to disambiguate the service instance. The following contribution method is meant for the instance of SymbolProvider service marked with the annotation @ApplicationDefaults.

public class AppModule {

   @Contribute(SymbolProvider.class)
   @Marker(ApplicationDefaults.class)
   public static void arbitraryName(
         MappedConfiguration<String, String> config) {

      config.add(SymbolConstants.PRODUCTION_MODE, "false");
   }
}

Enjoy!

New Tapestry 5 article at JAXenter

Mittwoch, Februar 17th, 2010

JAXenter just published a new article on Tapestry 5 written by me. The article is in German and is a first part of an article series about Tapestry 5. If you read German and want to start with Tapestry, you should read it. Enjoy.

HiveMind Still Alive

Donnerstag, Dezember 3rd, 2009

I just ran across Gaderian – a fork of the recently retired Apache HiveMind project. HiveMind was the IoC container of Tapestry 4 and was founded by Tapestry founder Howard M. Lewis Ship. In April 2009 the project has reached its end of life and has been moved to Apache Attic. The reason for dropping HiveMind was the difficulty of managing the release two complex frameworks.

HiveMind was my first experience with IoC and loved the project. Tapestry IoC is the IoC container for Tapestry 5 and is the successor of HiveMind. It was designed with session learned from HiveMind. The central concept in Tapestry IoC is to eliminate XML-driven approach of HiveMind and build an equivalent system around simple objects and methods.

However if you are a hard core HiveMind user and migrating to Tapestry IoC is not an option then Gaderian might be a project you should look at. The migration guide from HiveMind to Gaderian is available here.

Ulrich Stärk Joins the Tapesty Team

Montag, November 30th, 2009

Ulrich Stärk, a very active Tapestry community member and the technical reviewer of my Tapestry 5 book, has been voted in as a Tapestry committer. Ulrich provided tons of high quality patches and will make a great addition to the team. Welcome aboard, Ulrich!

Welcome to my Blog

Donnerstag, November 26th, 2009

Hello, my name is Igor Drobiazko. I’m an Apache Tapestry committer and I intend this blog to mostly about what’s going in Tapestry. You can expect posts about how things can be done with Tapestry 5, some tutorials and screencasts.  Posts related to my Tapestry 5 book will be written in German.  More general posts about Tapestry and other stuff will be in English.

Enjoy!

Tapestry 5 Blog - Copyright © 2009 - Eclectic Theme by Your Inspiration Web - Powered by WordPress