• Ant tasks for schema creation and documentation

    Since Hibernate 3.1 you can/should use the following ant tasks:     <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="classpath.schema"/>  ...
    Profile Photo
    last modified by sebersole
  • HowTo configure the C3P0 connection pool

    ConfigurationHere is a sample of C3P0 configuration. This is an extract of hibernate.cfg.xml: <!-- configuration pool via c3p0--> <property name="c3p0.acquire_increment">1</property> <property n...
    Profile Photo
    last modified by sebersole
  • Hibernate in WAS 5.x - fixes possible deadlock problem

    I know that a Hibernate application should use only one Hibernate session in a J2EE transaction (one hibernate session per application transaction). Anyway if you have already built a J2EE application that opens and c...
    Profile Photo
    last modified by sebersole
  • Using JNDI-bound SessionFactory with Tomcat 4.1+

    Using JNDI-bound SessionFactory with Tomcat 4.1+It is very useful to bind your SessionFactory to JDNI namespace. In most cases, this is possible to use hibernate.session_factory_name property in your configuration. Bu...
    Profile Photo
    last modified by sebersole
  • Dynamically configure an EJB3 EntityManager and its entities.

    In a multi-company, multi-database configuration, it is not desirable to rely on hardcoded, static instances of persistence.xml to specify available EntityManagers. You need to be able to start an EntityManagerFactory...
    Profile Photo
    last modified by sannegrinovero
  • Hibernate and Eclipse Integration

    Recently I had the experience of converting a Java project in Eclipse 3.1 to a plugin and RCP. Previously working Hibernate activity failed with errors indicating that the hibernate.cfg.xml file could not be located. ...
    Profile Photo
    last modified by anthonyhib
  • Testing with DBUnit

    DBUnit can re-create known datasets for unit test runs. Creating the initial dataset is often a lot of typing, an XSLT stylesheet can transform the Hibernate mapping files into a skeleton dataset definition: <?xml ...
    Profile Photo
    last modified by anthonyhib
  • Some Parent-Child Principles

    Getting Parents and Children to Play NiceIf you browse the Hibernate Discussion forum http://forum.hibernate.org you'll notice that about 50% of the questions are answered by RTFM, referencing the Parent/Child example...
    Profile Photo
    last modified by anthonyhib
  • iReport HQLFieldsReader and Jasper Reports build-in support for Hibernate

    iReport is a report builder/designer for JasperReports written in java, which allows users to visually edit reports instead of editing raw XML. Hibernate related forums include postings addressing the integration of i...
    Profile Photo
    last modified by anthonyhib
  • Using JasperReports with Hibernate

    This section will demonstrate a couple of ways to use the results of a Hibernate query as the datasource of a report in JasperReports. When the Hibernate query returns a simple collection of objects, The  JRBeanC...
    Profile Photo
    last modified by anthonyhib
  • Using Hibernate with Tomcat

    If you use Hibernate on Tomcat you don't have to use Tomcat's JNDI-bound JDBC connections. You can let Hibernate manage the JDBC connection pool. This works on all versions of Tomcat and is very easy to configure. ...
    Profile Photo
    last modified by anthonyhib
  • Hibernate3 JBoss and XDoclet tips

    Here's a mini-blog from our experiences getting Hibernate 3 working with JBoss 3.2.6, using XDoclet (2.1 or so?). Some of this is basic, some are bugs you are likely to hit, some is undocumented behavior or configurat...
    Profile Photo
    last modified by anthonyhib
  • A Short Primer On Fetching Strategies

    Note: All of this is also explained in more detail in the reference documentation. However, some Hibernate users prefer to collect information from Wiki pages or need a pointer if they post on the forum. This page des...
    Profile Photo
    last modified by anthonyhib
  • Composite Pattern

    Here's an attempt at implementing the Composite Pattern using Hibernate. http://c2.com/cgi/wiki?CompositePattern Also see this blog entry for an example using Hibernate Annotations: http://www.theresearchkitchen.com...
    Profile Photo
    last modified by anthonyhib
  • Delegate

    Several people have asked why Hibernate won't allow a single subclass to be mapped across multiple tables (it is possible to map a single class hierarchy across multiple tables using <joined-subclass>). We consi...
    Profile Photo
    last modified by anthonyhib
  • Databases, Performance and Commercial Vendors.

    (lies, damned lies, and benchmarks) Note: Please also read our Performance FAQ.   Gavin KingRecently, a company called Software Tree released a new version of their ORM product, JDX. This release came equipped wi...
    Profile Photo
    last modified by anthonyhib
  • Who uses Hibernate (2)

    The information provided below is an acknowledgement from actual developers that Hibernate was used on the projects/applications listed. This information should not be construed as a formal endorsement or backing by t...
    Profile Photo
    last modified by anthonyhib
  • UserQuotes

    Recently I've begun to see some comments on Hibernate - both first impressions comments and have used (and still uses) comments. Some of those sounded like real-life commercial taglines and I just thought it would be ...
    Profile Photo
    last modified by anthonyhib
  • Lightweight Class

    {{{test}}} Disclamer: While this pattern was and still is a common pattern in Hibernate world, there are alternative ways to solve this problem in Hibernate 3. Suppose I have the following persistent class: public cla...
    Profile Photo
    last modified by anthonyhib