db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-586) Provide an alternative means to shut down a database other than using getConnection()
Date Thu, 11 Apr 2013 16:51:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13629099#comment-13629099
] 

Rick Hillegas commented on DERBY-586:
-------------------------------------

Here is a proposal for a shutdown api which does not involve overloading JDBC connections:


We could add the following methods to EmbeddedDriver:

public   static  void      shutdownDatabase
(
    String  databaseName,
    char[]  dboName,
    char[]  dboPassword,
    Properties  attributes
)
    throws SQLException

    where

        databaseName is the name which you state on a connection url
        between the "jdbc:derby:" prefix and the ";" which marks
        the start of the optional attributes. So for instance:

            myDB
            memory:myMemoryDB

        props is the set of additional attributes and properties
        currently passed on connection urls and needed for
        security-related behaviors like authentication and ssl

public   static  void      shutdownEngine
(
    char[]  sysadminName,
    char[]  sysadminPassword,
    Properties  attributes,
    boolean     unloadDerbyClasses
)
    throws SQLException


We could add the following similar methods to ClientDriver40:

public   static  void      shutdownDatabase
(
    String  hostName,
    int         portNumber,
    String  databaseName,
    char[]  dboName,
    char[]  dboPassword,
    Properties  attributes
)
    throws SQLException


public   static  void      shutdownEngine
(
    String  hostName,
    int         portNumber,
    char[]  sysadminName,
    char[]  sysadminPassword,
    Properties  attributes,
    boolean     unloadDerbyClasses
)
    throws SQLException


All of these methods would return only after they completed their work. They would NOT raise
an exception if they succeeded.

We would want to add corresponding commands to ij:

shutdown database $databaseName [ $attributeName=$attributeValue ]*

shutdown engine [ unload ] [ $attributeName=$attributeValue ]*

    where distinguished attribute names include:

        user
        password
        host
        port

                
> Provide an alternative means to shut down a database other than using  getConnection()
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-586
>                 URL: https://issues.apache.org/jira/browse/DERBY-586
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services
>            Reporter: Lance Andersen
>            Priority: Minor
>
> It would be nice to provide an alternative mechanism to shutdown a database other than
calling getConnection() and having an Exception thrown.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message