To do the 'your own server' option, you could pick up Stardog Spring support, use one of the autoloading Spring servlet's, e.g. DispatcherServlet, and then configure the DataSourceFactory bean to create the embedded database. This would be a 'no code' option, you would just need the web.xml, Spring applicationContext.xml, and packaging everything up in a war file.
Here's a gradle file to get you started:
https://gist.github.com/3430658After that, then:
1. Put web.xml in src/main/webapp/WEB-INF, likely put a load-on-startup on your servlet to make it immediately available
2. Place applicationContext.xml in same location
3. Configure the dataSource in applicationContext
4. Run 'gradle war' and create the war, drop in Tomcat and enjoy. STARDOG_HOME will still have to be set, but the stardog.home JVM parameter is useful for this
Note the gradle build will pick up all Stardog jars and drop in WEB-INF/lib on its war packaging, so if there are any conflicts with the app server, you would want to adjust appropriately.
Al