# deregister=false attribute

The deregister=false attribute, if set to true (the default), deregisters the embedded JDBC driver from the DriverManager after a shutdown, so that the Derby classes can be garbage-collected.

You initially register the embedded driver by calling a DriverManager method such as DriverManager.getDrivers() or DriverManager.getConnection().

Once the embedded driver is registered, you can shut down the Derby engine by using the shutdown=true connection URL attribute. If you also specify deregister=false with the shutdown URL, the following will happen:

- The embedded driver will remain registered.
- The Derby classes will not be garbage-collected.
- You can get a Derby connection by issuing a call to DriverManager.getConnection().

In contrast, if you use the default setting of deregister=true when you shut down the database, the following will happen:

- The embedded driver will be deregistered.
- The Derby classes will be garbage-collected.
- You will have to call Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance() before you obtain a new Derby connection by calling DriverManager.getConnection().

This attribute has no meaning if it is used with the network driver.

## Combining with other attributes

This attribute is valid only when issued in conjunction with the shutdown=true attribute.

## Examples

    -- shut down salesDB and deregister the driver
    jdbc:derby:salesDB;shutdown=true
    -- shut down salesDB, but do not deregister the driver
    jdbc:derby:salesDB;shutdown=true;deregister=false

Parent topic: Setting attributes for the database connection URL