This is an event.d-script for the new Ubuntu Upstart.
The event gets started/respawned on runlevels 2-5. If you change to level 0, 1 or 6, the process gets stopped/killed.
Manual start/stop works through the same commands start and stop. With status you can check the status.
# manages Solr search engine
start on runlevel 
stop on runlevel 
kill timeout 30
exec /usr/bin/java -jar start.jar
This does the same using the traditional init.d-way.
After creation of the script in /etc/init.d you also have to make the symlinks in the rc.2..rc.5-directories.