Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.00, 3.01, 3.02, 3.03, 3.04, 3.05, 3.06, 3.07, 3.08, 3.09, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.16, 3.17
  • Fix Version/s: 3.18
  • Component/s: Referencing

Description

The following method call:

PGSimpleDataSource ds = new PGSimpleDataSource();
ds.setServerName(...);
ds.setDatabaseName(...);
ds.setUser(...);
ds.setPassword(...);
Hints.putSystemDefault(Hints.EPSG_DATA_SOURCE, ds);

works only partially. The referencing module still perform a connection to the default JavaDB database, creating it if needed, and only then it try to connect to the database using the given DataSource.

This is caused by the fact that FactoryRegistry first creates a ThreadedEpsgFactory using the no-argument constructor (thus, without hints), then invokes the availability() method with cause a connection to the database, and only after that point compares the hints with the requested ones.

Activity

There are no comments yet on this issue.

People

  • Assignee:
    Martin Desruisseaux
    Reporter:
    Martin Desruisseaux
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: