You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2018/02/06 09:32:00 UTC
[jira] [Updated] (SIS-395) Need a public way to get connection to
"SpatialMetadata" database
[ https://issues.apache.org/jira/browse/SIS-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Desruisseaux updated SIS-395:
------------------------------------
Description:
There is currently no public API for getting the {{javax.sql.DataSource}} instance for Apache SIS {{SpatialMetadata}} database. There is {{Initializer.getDataSource()}} method in the {{org.apache.sis.internal.metadata.sql}} but this is non-public API, subject to change in any future SIS version and will not be accessible in Java 9 (unless the restriction is bypassed by Java options on the command-line).
A standard way to provide {{DataSource}} in Java is with _Java Naming and Directory Interface_ (JNDI). However there is no JNDI environment by default in standard Java installation; JNDI are rather provided by containers like Tomcat. We could provide our own micro-JNDI when no environment is installed, but it may be disruptive as installing our own JNDI environment would have a JVM-wide impact.
A last-resort approach would be a {{public static DataSource getXXX()}} method somewhere, but it would not follow standard mechanisms (JNDI, dependency injection, _etc._).
was:
There is currently no public API for getting the {{javax.sql.DataSource}} instance for Apache SIS {{SpatialMetadata}} database. There is {{Initializer.getDataSource()}} method in the {{org.apache.sis.internal.metadata.sql}} but this is non-public API, subject to change in any future SIS version and will not be accessible in Java 9 (unless the restriction is bypassed by Java options on the command-line).
A standard way to provide {{DataSource}} in Java is with _Java Naming and Directory Interface_ (JNDI). However there is no JNDI environment by default in standard Java installation; JNDI are rather provided by containers like Tomcat. We could provide our own micro-JNDI when no environment is installed, but it may be disruptive as installing our own JNDI environment would have a JVM-wide impact.
> Need a public way to get connection to "SpatialMetadata" database
> -----------------------------------------------------------------
>
> Key: SIS-395
> URL: https://issues.apache.org/jira/browse/SIS-395
> Project: Spatial Information Systems
> Issue Type: Improvement
> Components: Metadata, Referencing
> Affects Versions: 0.5, 0.6, 0.7, 0.8
> Reporter: Martin Desruisseaux
> Priority: Major
> Fix For: 1.0
>
>
> There is currently no public API for getting the {{javax.sql.DataSource}} instance for Apache SIS {{SpatialMetadata}} database. There is {{Initializer.getDataSource()}} method in the {{org.apache.sis.internal.metadata.sql}} but this is non-public API, subject to change in any future SIS version and will not be accessible in Java 9 (unless the restriction is bypassed by Java options on the command-line).
> A standard way to provide {{DataSource}} in Java is with _Java Naming and Directory Interface_ (JNDI). However there is no JNDI environment by default in standard Java installation; JNDI are rather provided by containers like Tomcat. We could provide our own micro-JNDI when no environment is installed, but it may be disruptive as installing our own JNDI environment would have a JVM-wide impact.
> A last-resort approach would be a {{public static DataSource getXXX()}} method somewhere, but it would not follow standard mechanisms (JNDI, dependency injection, _etc._).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)