284 APPENDIX B n (Free web hosting with ftp) HIBERNATE TOOLS APPENDIX B

284 APPENDIX B n HIBERNATE TOOLS APPENDIX B n HIBERNATE TOOLS The only missing output is the database schema. The reverse engineering file can be generated from the database as we have described here, but it can also be created manually. We have already shown that it is possible to use the Hibernate Console s SchemaExport function to export an annotated POJO or mapping file into a database schema. So, using this functionality, it is possible to create pretty much everything from scratch, starting from a mapping, a database, or a set of POJOs. When you create your code generation configuration, you need to specify the location of your reverse engineering file, and the console configuration that will be used to establish the appropriate connection details. You need to specify the output directory into which the generated files should be written, and you can also specify a package that any generated classes should belong to. You will then need to select the types of output to be generated, as shown in Figure B-25. Figure B-25. Selecting the types of output to be generated In Figure B-25, we have selected everything except the Hibernate configuration file (we ve already got one), the JBoss Seam application (we re not interested in that), and because of a minor bug the EJB 3 annotations option. You would not normally elect to generate both annotations and XML mapping files anyway. nNote At the time of writing, the EJB3/JSR-220 annotations exporter option does not work. If this problem has not been fixed by the time you read this book, you can use an Ant task instead. The Ant Tasks As you will have noticed if you followed through the Eclipse discussion, our example project for this appendix includes build.xml and build.properties files. These are not strictly necessary when working with Eclipse, but it is often desirable to be able to build all the components
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Leave a Reply