Skip to content

Instantly share code, notes, and snippets.

@djechelon
djechelon / Transaction.java
Created February 16, 2016 08:31
Transaction auto-closeable helper for Spring Transactions
public interface Transaction extends AutoCloseable
{
@Override
public void close() throws TransactionException;
public void rollback();
}
@djechelon
djechelon / Apache Tomcat 8 Start stop script init.d script
Last active December 27, 2016 13:46 — forked from arberg/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO
#