WebObjects/EOF/Using EOF/Database Adaptors and Plugins

WebObjects Wikibooks considered deprecated edit

The WebObjects Wikibooks pages are considered deprecated. Please find this page on the new wiki at http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Database+Adaptors+and+Plugins.

PostgreSQL edit

These instructions are especially for those wanting to use PostgreSQL with primary keys of type serial.

(Valid as of 5th May 2005 for a Mac OS X development system with WO5.2.3 and PostgreSQL 7 or 8)

Step 1 edit

Obtain the following items from http://www.hexdreams.com/ placing their built products as suggested (but do check each item for bug fixes or notes)...

  • PostgresqlPlugIn.framework --> /Library/Frameworks
  • PostgresqlPlugInBundle.EOMPlugin --> /Developer/EOMBundles

Step 2 edit

You should have the following Adaptor info set (in EOModeler) for your database after the above install:

  • Username: username
  • Password: password
  • URL: jdbc:postgresql://localhost/yourDb
  • Driver: org.postgresql.Driver
  • Plugin: PostgresqlPlugIn(*)

(*) Note: case sensitive.

Step 3 edit

Link the PostgresqlPlugIn.framework into your project.

MySQL edit

From: http://www.macdevcenter.com/pub/a/mac/2003/09/26/webobjects.html?page=3


In order to set up MySQL you will need to install it first. If you have not, I recommend using Aaron Faby's fantastic installer (http://www.serverlogistics.com). After installing MySQL you will need the correct JDBC driver, which can be downloaded from the MySQL website. (put it into /Library/Java/Extensions/)

From there, you will need to do the following, using the "Model:Switch Adaptor..." menu item:

  • Use the JDBC connector
  • Username: <my_database username>
  • Password: <my_database password>
  • URL: jdbc:mysql://localhost/<my_database>
  • Driver (optional): com.mysql.jdbc.Driver (Note: in old MySQL versions it was org.gjt.mm.mysql.Driver)
  • PlugIn (optional): leave blank

Also see: http://web.archive.org/20040710072001/homepage.mac.com/kelleherk/iblog/C711669388/E733468496/index.html and: http://web.archive.org/20041122232437/homepage.mac.com/kelleherk/iblog/C711669388/E1395049038/index.html

OpenBase edit

The OpenBase installer should install the JDBC driver. In EOModeller set the URL to:

jdbc:openbase://<host>/<DatabaseName>

The Driver should be set to:

com.openbase.jdbc.ObDriver

Plugin should be left blank.

FrontBase edit

The OpenBase installer should install the JDBC driver. In EOModeller set the URL to:

jdbc:FrontBase://127.0.0.1/Tempo

Driver and plugin should be left blank.

Oracle edit

MSSQLServer edit

You will need the JDBC driver for SQL 2000 from Microsoft. A search for Microsoft SQL Server 2000 JDBC should give you the right link. You can untar the file and place the resulting .jar files in /Library/Java/Extensions.

In EOModeler use the following settings:

  • UserName: <db username>
  • Password: <db password>
  • URL: jdbc:microsoft:sqlserver://<Servername>:1433;DatabaseName=<;DB name>
  • Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver
  • PlugIn: MicrosoftPlugIn

If you neglect to specify the MicrosoftPlugIn it will let you connect to the database, but will show you tables that appear to be meta data instead of your actual data.

FileMaker edit

360works makes a PlugIn for FileMaker, which is now an open source project.