Difference between revisions of "NexJ Express Connecting to PostgreSQL"

From CDOT Wiki
Jump to: navigation, search
Line 27: Line 27:
  
 
Package: <code>nexj</code>
 
Package: <code>nexj</code>
::Create <code>postgresql.connections</code>
+
::Create <code>postgresql.connections</code> using NexJ Studio
 
::Edit <code>default.config</code> to use PostgreSQL
 
::Edit <code>default.config</code> to use PostgreSQL
 
::Edit all <code>*.connections</code> files to use PostgreSQL
 
::Edit all <code>*.connections</code> files to use PostgreSQL

Revision as of 13:10, 11 January 2011

PostgreSQL Adapter for NexJ - Connect to PostgreSQL Driver

Install PostgreSQL

Download: Installer version Version 9.0.1-1 from list of PostgreSQL downloads.

Install PostgreSQL JDBC3 driver

Download: JDBC3 Postgresql Driver, Version 9.0-801 @ http://jdbc.postgresql.org/download.html
Install: Copy driver to [jdk folder]/jre/lib/ext

Code: Add PostgreSQL Driver

Package: nexj.core.persistance.sql

Create PostgreSQLAdapter.java by extending SQLAdapter
Create PostgreSQLSchemaManager.java by extending SQLSchemaManager
Edit RelationalDatabase.java
Edit RelationalDatabaseFragment.java
Edit SQLSchemaManagerFactory.java

Package: nexj.core.meta.sys

Edit system.dstypes

UnitTest: Test Connectivity to database

Package: nexj.core.persistance.sql

Create PostgreSQLAdapterTest.java by extending SQLAdapterTest
Create PostgreSQLSchemaManagerTest.java by extending SQLSchemaManagerTest

Package: nexj

Create postgresql.connections using NexJ Studio
Edit default.config to use PostgreSQL
Edit all *.connections files to use PostgreSQL

TODO: find out how to configure UnitTests for more than one Database