WebObjects/Project WONDER/Frameworks/PostgresqlPlugin

From Wikibooks, open books for an open world
< WebObjects‎ | Project WONDER
Jump to navigation Jump to search

There are three pieces required to use PostgreSQL with WO:

JDBC Driver[edit | edit source]

The JDBC driver is required for WO just like for any Java application that talks to a database. You can download the JDBC driver for PostgreSQL from http://jdbc.postgresql.org/download.html . Make sure to download the driver that matches the version of PostgreSQL that you have installed.

The easiest route for installation is to drop the JDBC jar file into your /Library/Java/Extensions. Be aware that putting jars in /Library/Java/Extensions has all the usual caveates with respect to classpath references and versioning (it is loaded by the system classloader and is a global version for all of your Java applications).

PostgresqlPlugin Framework[edit | edit source]

The easiest way to get the PostgresPlugin.framework is to download one of the nightly builds of Project WOnder from the mDimension nightly build server at http://webobjects.mdimension.com/wonder . Uncompress the tar of the version you need into your /Library/Frameworks folder to install them. You must add the PostgresPlugin.framework to your WOApplication so that it is able to find the plugin.

PostgreSQL EOModeler Bundle[edit | edit source]

Currently the Wonder build server does not autobuild the piece (coming soon). This is only needed for generating SQL out of EOModeler, so if you're just deploying, this isn't necessary. To use the EOModeler Bundle, checkout Project Wonder from its SourceForge repository (you can just checkout Wonder/PlugIns if you don't want everything). Go into the PostgresPlugInBundle folder and run xcodebuild, or load the project into Xcode and build it from the GUI. This will produce a build/Default/PostgresqlPlugIn.EOMplugin folder that you can copy into your /Developer/EOMBundles folder. Note that you CANNOT put it into your ~/Devloper/EOMBundles folder because EOModeler decides it doesn't want to look in that folder.

Using PostgreSQL in EOModeler[edit | edit source]

Once you have set everything up, using PostgreSQL in EOModeler is actually very straight-forward. Remember to add the PostgresPlugin.framework to your project, open your model, and Set Adapter Info to:

URL: jdbc:postgresql://yourhost/yourdatabase Username: whatever Password: whatever Driver: org.postgresql.Driver Plugin: PostgresqlPlugIn