Eyal Lupu Java Blog

Hibernate - Tuning queries Using Paging, Batch Size, and Fetch Joins
6 Jun 2008 6:08am GMT Hi, Another entry about queries - this time a tuning test case and the relations between simple queries, join fetch queries, paging query results, and batch size. Paging the Query Results Since I have never said anything about paging in this blog I start with a short introduction about paging in EJB3: To support paging the EJB3 Query interface defines the following two methods: setMaxResults - sets the number of maximum rows to retrieve from the database setFirstResult - sets the first row...

Spring Auto-Detected Components - Part I
23 May 2008 2:12pm GMT Hi, This time few words about Spring. In the last versions of Spring (since 2.5, although some support is provided since version 2.0) a new way of configuration was introduced - annotation driven configuration. In this entry I'll describe how to configure beans using annotations. @Component The most basic way to configure a bean in the factory is by annotating its class with the @Component: @Component public class MyApplicatoinService {    private MyDao...

Hibernate - the @Any annotation
23 Apr 2008 7:10pm GMT Hi, The 3.3.1.GA release of Hibernate annotations (released on March) includes a new annotation: the @Any (see http://opensource.atlassian.com/projects/hibernate/browse/ANN-28). This annotation (accomplished with @AnyMetaDef) provides the Hibernate annotation and EntityManager support for the "any" type.The Any Property TypeSometimes we need to map an association property to different types of entities that don't have a common ancestor entity - so a plain polymorphic association doesn't do the...

Spring as a message provider for Wicket
24 Feb 2008 6:53pm GMT Hi, this one is about Wicket integration with Spring. Wicket has a built-in integration with Spring using the wicket-spring module, but this module doesn't (or at least I didn't find any) support the usage of Spring's Application context as a Wicket message provider (as we know Spring application context is a org.springframework.context.MessageSource). Probably some, if not the most, of you think "what do I need this for?" well…here is a real life situation I've...

JavaMail - Sending Embedded Image in an HTML Mail Message
31 Jan 2008 7:54pm GMT Hi, This time JavaMail.  And to be more concrete - how to send an HTML mail message including its resources embedded within the mail message. You can find resources about it over the net, but since somebody had asked me about it, and I wrote a sample class it is a good opportunity to mention it here too. The Question How can I, using JavaMail, send a self contained HTML mail message - for example, if the HTML has a reference to an image the image is embedded within the message,...

1 2 3 4 5 > >>

© dotMobi 2007-2008. All rights reserved