后现代住宅销售与服务系统毕业设计论文内容摘要:

tall the plugin, click on the disclosure triangle to the left of the bookmark, and again on the next one that appears inside of it, until you can see the icon for the plugin itself. When you click on that, the Preview view will update to show you an interface that allows you to install the Install Now to actually install it, and let Eclipse walk you through the TradeOffs, below, for some discussion about this license agreement. You may wish to read it carefully before deciding to use Hibernate Synchronizer in a project of your own. I think it39。 s probably fine, but it is confusingly based on the GPL without actually being open source. Now that the plugin is installed, you need to quit and relaunch Eclipse for it to take effect. The dialog seems to imply that Eclipse will restart itself, but in my experience, clicking Yes merely causes the environment to quit, and you have to relaunch it manually. This may be a limitation of Eclipse 39。 s Mac OS X implementation。 Eclipse 3 is going to be the first release that promises firstclass support for OS X. In any case, this is a very minor issue. If you need to restart Eclipse, do so now, because it39。 s time to start configuring the plugin to put it through its paces! Configuration Once Eclipse es back up, you can close the Install/Update perspective. Open a Java project that uses Hibernate. If you39。 ve been going through the examples in the Developer39。 s Notebook, you39。 ll have several directories from which to choose. I39。 ll be looking at the examples as they exist in Chapter 3, which is the sample chapter available online. You can also download the source for all of the examples from the book39。 s site. If you39。 re creating a new Eclipse project to work with one of the example source directories, just choose File New Project, specify that you want to create a Java project and click Next, give it a name (Hibernate Ch3 in my case, as shown in Figure 11), uncheck the Use default checkbox so that you can tell Eclipse where to find the existing project directory, and hit the Browse button to locate where it exists on your own drive. At this point, you can click Finish to create the project, but I generally like to click Next and doublecheck the decisions Eclipse is making. (Of course, if it gets anything wrong, you can always go back and fix the project properties, but I tend to find it disconcerting to be greeted by a ton of errors and warnings immediately if there is a library missing or something.) In this case, my caution was unnecessary. Eclipse figured out exactly how the directory was structured and intended to be used, and found all of the thirdparty libraries I had downloaded and installed in order to enable Hibernate and the HSQLDB database engine to run. (A detailed walkthrough of this process is the bulk of Chapter 1 of my Developer39。 s Notebook.) This kind of smart adaptability is one of the great features of Eclipse. Figure 12 shows our new project open and ready for experimentation. It also shows that Eclipse doesn39。 t like to fit into a window small enough for a reasonable screen shot。 I39。 m going to have to work with partial window captures from this point on. The next thing we need to do is create a Hibernate configuration file that Hibernate Synchronizer can use. There is already a file in the src directory, which is how the examples in the book work, but Hibernate Synchronizer only works with Hibernate39。 s XMLbased configuration approach. So we39。 ll need to replicate the contents of into a new file. On the bright side, this gives us our first opportunity to play with a feature of Hibernate Synchronizer, the configuration file wizard. Choose File New Other, click the newly available Hibernate category, pick Hibernate Configuration File, and click Next. When the wizard starts up, the directory it offers to put the file into depends on the file you39。 ve currently got selected in Eclipse. Let39。 s be sure to put it at the toplevel src directory alongside the properties version, for consistency. Fill in the rest of the information requested by the wizard to match the properties version of the configuration, as shown in Figure 14. Notice that, unlike when using Ant to control the execution of Hibernate (which was the approach used in the Developer39。 s Notebook), we have no way to control the current working directory when Hibernate is invoked, so we need to use a fully qualified path to the database file in the URL. In my case, this takes the (somewhat ungainly) value jdbc:hsqldb:/Users/jim/Documents/Work/OReilly/Hibernate/Examples/ch03/data/music. (If anyone can tell me how to get Eclipse or Hibernate Synchronizer to use a particular working directory for a project, I39。 d certainly be interested. I39。 m still a beginner when it es to Eclipse, so it would not surprise me at all to learn that this is possible and that I simply don39。 t know how to do it.) Filling in the Driver Class is a little strange: You need to click the Browse button, and start typing the driver name. If you type jdbcD, the window will present only two choices, and you can easily click the right one. You can click Finish to create the configuration file. Hibernate Synchronizer is now ready to use. It opens the file it created so you can see the structure and details of an XML configuration file for Hibernate. A quick way to test that the configuration is working is to play with the other wizard interface. Choose File New Other, click the newly available Hibernate category, pick Hibernate Mapping File, and click Next. When the wizard es up, it should be populated with the settings information we just entered, and you can click the Refresh button to make sure it can municate with the database and show you that it found a TRACK table. The first time you do this, you might have to confirm the location of the .jar file containing the HSQLDB drive。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。