APPENDIX D (Web hosting services) n UPGRADING FROM HIBERNATE 2 317

APPENDIX D n UPGRADING FROM HIBERNATE 2 317 n UPGRADING FROM HIBERNATE 2 317 Hibernate 2 provided a number of aids to the generation of POJOs, mapping files, and database schemas. Hibernate 3 has started a process of migrating to external support for these processes. Where these tools are retained, they can be found in the org.hibernate.tool package and its subpackages. For example, previously a facility provided by the CodeGenerator class to generate DDL from your mappings existed in Hibernate 2. This is still provided in Hibernate 3, but the fully qualified name of the SchemaExport class is now org.hibernate.tool.hbm2ddl. SchemaExport but even though the tool still exists, the generation of mapping files from POJOs in Hibernate 3 would usually be conducted by an Eclipse plug-in, or the Hibernate Tools Ant tasks. See Appendix B for an extensive discussion of the use of the Eclipse plug-ins and Ant tasks. Changes with Java 5 The latest release of Java introduced some pretty substantial changes to the language. It also introduced some incompatibilities with the previous class file format. The only significant addition to Hibernate 3 that relies directly upon a Java 5 specific feature is the annotations support. Otherwise, a 1.4 JVM will work fine. In fact, it is even possible to build Hibernate 3 for a 1.3 JVM, although a suitable binary version is no longer distributed. The use of annotation-based mapping in Hibernate 3 is discussed in depth in Chapter 6. Summary In this appendix, we examined some of the changes that have been introduced with Hibernate 3, and showed how code written for Hibernate 2 can be run in parallel with Hibernate 3, or be readily adapted to run directly under Hibernate 3.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Leave a Reply