Skip to content

Commit

Permalink
utility script to clear EJB timer info (in case of problems during up…
Browse files Browse the repository at this point in the history
…grade/deployment)
  • Loading branch information
pameyer committed Mar 6, 2017
1 parent deaad10 commit 1e795e3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions doc/sphinx-guides/source/_static/util/clear_timer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

# EBJ timers sometimes cause problems; utility to clear generated directories and database rows

# assumes that glassfish is not running, and
# also assumes this script is being run as root, and that the postgres user had passwordless
# access to the database (local sockets, or appropriate environmental variables).

# directory where glassfish is installed
GLASSFISH_DIR=/usr/local/glassfish4

# directory within glassfish (defaults)
DV_DIR=${GLASSFISH_DIR}/glassfish/domains/domain1

# name of dataverse database
DV_DB=dvndb

# OS user for the database
DB_USER=postgres

rm -rf ${GLASSFISH_DIR}/${DV_DIR}/generated/
rm -rf ${GLASSFISH_DIR}/${DV_DIR}/osgi-cache/felix

sudo -u ${DB_USER} psql ${DV_DB} -c 'delete from "EJB__TIMER__TBL"';


0 comments on commit 1e795e3

Please sign in to comment.