Open main menu

CDOT Wiki β

Changes

NexJ Express Connecting to PostgreSQL

559 bytes added, 00:28, 30 November 2010
1- Setup the postgresql-connection
=== 1- Setup the postgresql-connection ===
: TODO* TODOs: Create and Configure the work/ws/core/test/nexj/postgresql.config
:: for now, the contents of default.config is changed to postgresql specifications instead of mysql
: walk-through lines from 214-218 in SQLManagementConnectionFactory.java
: Walk-through properties and see what exactly is needed to be authorized to connect to 'test' database
: Make sure the model connects to the PostgreSQL using user 'test'
* Done
: Configure the work/ws/core/test/nexj/postgresql.connection
: Load the driver from RelationalDatabaseFragment.java
:: The package that is being imported: <code> org.postgresql.xa.PGXADataSource </code>
: Load metadata from the particular driver
::
<source lang=java>
props.setProperty(XMLMetadataLoader.CONNECTIONS_URL_PROPERTY, "/nexj/" + sAdapter.toLowerCase(Locale.ENGLISH) + ".connections"); // sets the properties to postgresql.connection
</source>
: Configure system.dstype: Load the driver from RelationalDatabaseFragmentConfigure DatabaseTools.java // This file calles SQLSchemaMangerFactory.javaand creates the connection:: The package that is being imported: <code> orgConfigure RelationalDatabase.postgresqljava SQLRAConnectionFactory.xajava: Configure Driver type and some other properties in JDBCInfo.PGXADataSource </code>java
=== 2- Add PostgreSQL adapter type to related java files===
1
edit