Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Which databases are the most used with Java Date: Tue, 15 Aug 2017 07:45:17 +0200 Organization: Decebal Computing Lines: 27 Message-ID: <87a831peoi.fsf@munus.decebal.nl> References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <878tins1li.fsf@munus.decebal.nl> <87wp67qhyp.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="72fb8bea0235c6b94245dccb186de60d"; logging-data="14288"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Nn60Z6FUSf3Gt/Q0LLZsmpXEX5PU36JQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:Z1gET0vOUuQX7XEt/WWgsxHsJ5Q= sha1:aJrZ6G5VtxTWX8jrhz+nnVZ0Zgw= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:37227 Robert Klemme writes: > But why tie your code to concrete JDBC implementations at all, > especially since you do not seem to want to create custom code for > individual JDBC drivers? Why not just pass in the class name, JDBC URL > and other properties which are needed during initialization and free > yourself from any dependency? That is a great idea. I should make the abstract class concrete: then this could be used for databases where there is no implementation for yet. I did make custom code for the SQLite3 implementation. I do not know if the others need custom code yet. For example I have the following in my cron: java -cp ${_classpath} nl.decebal.sql.SQLite3 --areDBsLocked ${_databases[*]} To verify that about 20 different databases are not locked. In SQLite3 only one program can have an active connection to a database. And if you have a databasebrowser open and forgot to do a `Write Changes’ other programs get a locked database. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof