Closes the database context.
()
| 144 | * Closes the database context. |
| 145 | */ |
| 146 | public synchronized void close() { |
| 147 | if(server != null) { |
| 148 | try { |
| 149 | server.stop(); |
| 150 | } catch(final IOException ex) { |
| 151 | Util.stack(ex); |
| 152 | } |
| 153 | server = null; |
| 154 | } |
| 155 | if(context != null) { |
| 156 | context.close(); |
| 157 | context = null; |
| 158 | } |
| 159 | } |
| 160 | } |