Log in to follow, share, and participate in this community.
Article Performance: copying objects with DML like operations
Performance: copying objects with DML like operationsThe contextAssume you are dealing with a hibernate operation which requires to copy a lot of objects in the database. For instance you are having 2 objects: budget and entries and you want to duplicate the budget and ...
Article Ant tasks for schema creation and documentation
Ant tasks for schema creation and documentationSince Hibernate 3.1 you can/should use the following ant tasks: <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="classpath.schema"/>
...
HowTo configure the C3P0 connection poolConfigurationHere 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...
Article Hibernate in WAS 5.x - fixes possible deadlock problem
Hibernate in WAS 5.x - fixes possible deadlock problemI 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...
Article Using JNDI-bound SessionFactory with Tomcat 4.1+
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...
Article Dynamically configure an EJB3 EntityManager and its entities.
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...
Hibernate and Eclipse IntegrationRecently 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. ...
Testing with DBUnitDBUnit 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 ...
Some Parent-Child PrinciplesGetting 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...
Article iReport HQLFieldsReader and Jasper Reports build-in support for Hibernate
iReport HQLFieldsReader and Jasper Reports build-in support for HibernateiReport 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...
Using JasperReports with HibernateThis 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...
Using Hibernate with TomcatIf 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. ...
Hibernate3 JBoss and XDoclet tipsHere'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...
A Short Primer On Fetching StrategiesNote: 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...
Composite PatternHere'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...
DelegateSeveral 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...
Article Databases, Performance and Commercial Vendors.
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...
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...
UserQuotesRecently 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 ...
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...