Difference between revisions of "NexJ Express Connecting to PostgreSQL"
(→1- Setup the postgresql-connection) |
(→1- Setup the postgresql-connection) |
||
Line 3: | Line 3: | ||
=== 1- Setup the postgresql-connection === | === 1- Setup the postgresql-connection === | ||
− | : TODO:Configure the work/ws/core/test/nexj/postgresql.config | + | : TODO: 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 | :: for now, the contents of default.config is changed to postgresql specifications instead of mysql | ||
: Configure the work/ws/core/test/nexj/postgresql.connection | : Configure the work/ws/core/test/nexj/postgresql.connection |
Revision as of 16:06, 22 November 2010
PostgreSQL Adapter for NexJ - Create Test Environment
Contents
1- Setup the postgresql-connection
- TODO: 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
- Configure the work/ws/core/test/nexj/postgresql.connection
/* MySQLAdapterTest.java */
try
{
s_metadata = loadMetadata(ADAPTER_NAME);
}
/* SQLDataTest.java */
protected static Metadata loadMetadata(String sAdapter)
{
Properties props = SysUtil.getConfigProperties(); // sets DEFAULT_CONFIG_URL = '/' + NAMESPACE + "/default.config"
props = new Properties(props);
props.setProperty(XMLMetadataLoader.CONNECTIONS_URL_PROPERTY, "/nexj/" + sAdapter.toLowerCase(Locale.ENGLISH) + ".connections"); // sets the properties to postgresql.connection
- SQLSchemaMangerFactory.java
- RelationalDatabaseFragment.java
- The package that is being imported:
org.postgresql.jdbc3.Jdbc3.SimpleDataSource
- The package that is being imported:
3- Create a PostgreSQL database through some scripts
- postgresql_setup.sql
4- Create the extended PostgreSQL source files
- PostgreSQLAdapter.java
- PostgreSQLSchemaManger.java
5- Create the extended PostgreSQL test files
- PostgreSQLAdapterTest.java
- PostgreSQLSchemaMangerTest.java