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: Fri, 18 Aug 2017 23:14:47 +0200 Organization: Decebal Computing Lines: 75 Message-ID: <87o9rcinnc.fsf@munus.decebal.nl> References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <87a833wzcx.fsf@munus.decebal.nl> <87pobz9yv5.fsf@munus.decebal.nl> <87h8x9pfi8.fsf@munus.decebal.nl> <87mv70n5pd.fsf@munus.decebal.nl> <87k222lloh.fsf@munus.decebal.nl> <87k221jx6m.fsf@munus.decebal.nl> <87ziaxhujr.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="4e79c97da8fb74945529c91ed76be274"; logging-data="19928"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bGb4ZHfQgS+/P4/9liM/+Qot1CfQgE70=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:CBq4j9JMkqF5V+R2k6wHQk23l6M= sha1:xwPKVo7IbuzjwckUDhFWz6ZZ620= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:37277 Arne Vajhøj writes: > On 8/18/2017 9:31 AM, Cecil Westerhof wrote: >> Arne Vajhøj writes: >>> Java is good at many things. >>> >>> But for this sort of scripting I would go for a script language. >>> >>> And JVM script languages can use your class directly. >> >> But then I have to maintain two programs: the Java and the scripting >> language. >> For me it would not be a problem to work with (for example) Groovy, >> but for other people it could be. > > Yes and no. > > If this script is to be maintained by the software development > team, then Java is probably a very safe choice. > > But if the script is to be maintained by sys adm or DBA > or OPS, then it is a completely different context. These > guys most likely do not know Java, but will knows various > scripting languages maybe including Python. > > If you give those guys a Java library and Jython, then > they can maintain the scripts. I give them my bash script, this is at least on Linux the most used scripting language. But it would not hurt to also give a python example. That is also used a lot. You keep me busy. ;-) This is a stripped down version of my script. #!/usr/bin/env bash set -o errexit set -o nounset declare -r _classpath=… declare -r _databases=( database1 database2 database3 . . . databaseN ) declare -r _scriptname=${0##*/} declare database declare parameter case ${_scriptname} in checkLocksSQLite.sh) parameter="--areDBsLockedShowErr" ;; checkLocksSQLiteVerbose.sh) parameter="--areDBsLocked" ;; *) printf "Got an unknown command name: %s.\n" "${_scriptname}" exit 1 ;; esac java -cp ${_classpath} nl.decebal.sql.SQLite3 "${parameter}" ${_databases[*]} -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof