-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utility script to clear EJB timer info (in case of problems during up…
…grade/deployment)
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"'; | ||
|
||
|