Multiple Instances running under Tomcat

Need help? Post your questions here.

Moderator: moderators

Multiple Instances running under Tomcat

Postby uncultured » Tue Jul 06, 2010 1:42 pm

First, my apologies if this has been covered elsewhere.

I have a Windows machine running Tomcat 6. I have successfully deployed the Subsonic WAR. I noticed that there did not appear to be a configuration option for telling it to store preferences or the music database in a location other than c:\subsonic. After searching through these forums, I discovered that one could pass a SUBSONIC_HOME parameter when starting Subsonic (I tried adding this to the web.inf). After making this modification, Subsonic would either fail to start or apparently ignore this directive.

My question is: am I going in the right direction, trying to set this variable, or do I need to look elsewhere/can this even be done. I have seen one suggestion to use separate virtual machines for each instance (a rather large commitment of resources for a relatively lightweight application). Ultimately, all I want is for someone to be able to go to mydomain.com/username1 and get their own Subsonic playground - their own music and their own configuration. Another individual going to mydomain.com/username2 should again get his/her own completely independent instance.

Thank you very much for any help you might be able to provide!

Patrick
uncultured
 
Posts: 2
Joined: Tue Jul 06, 2010 1:32 pm

Postby kermit22 » Wed Jul 07, 2010 10:26 pm

+1 for anyone that can assist with this. I am looking to do something similar with my setup.
User avatar
kermit22
 
Posts: 218
Joined: Fri Feb 20, 2009 7:00 pm

Postby sindre_mehus » Thu Jul 08, 2010 8:52 am

You can set the Java system property "subsonic.home" to do this.

I don't remember from the top of my head where you specify system properties in Tomcat, but you can surely google it.

Java system properties are often specified like this:

-Dsubsonic.home=c:/foo
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby uncultured » Fri Jul 09, 2010 12:52 pm

sindre_mehus wrote:You can set the Java system property "subsonic.home" to do this.

I don't remember from the top of my head where you specify system properties in Tomcat, but you can surely google it.

Java system properties are often specified like this:

-Dsubsonic.home=c:/foo


I tried that, as well as setting the SUBSONIC_HOME (and subsonic.home, for good measure) property in the web.inf file for Subsonic. This didn't work, but if you're suggesting that this is the way to do it, then I imagine it is certainly within the realm of possibilities that either Tomcat or my system are not properly configured to allow Subsonic to read/write files in the directory I specified. Looks like I'll need to experiment!
uncultured
 
Posts: 2
Joined: Tue Jul 06, 2010 1:32 pm

Postby mgrant » Mon Jul 12, 2010 4:10 pm

If you're running tomcat 6 on windows, you set subsonic.home as follows.

1. Run tomcat6w.exe
2. Click on the Java tab
3. Add "-Dsubsonic.home=d:\subhome" to the Java Options field.
4. Click OK

Then restart tomcat. You should notice that subsonic will now use d:\subhome instead of c:\subsonic as the home dir. You should, of course, use a drive/path that's appropriate for your install.

This solves the problem of choosing where the subsonic home is but, since this method sets subsonic.home globally, it doesn't solve running multiple DIFFERENT instances using different homes.

So far I've been unable to find a way to accomplish that.

-mg
mgrant
 
Posts: 76
Joined: Mon Mar 03, 2008 1:15 am

Postby tsquillario » Thu Aug 11, 2011 11:11 pm

Did you ever find a workaround for this?

I have two instances of Tomcat running on different ports. I'd like to have two separate versions of subsonic running in different directories.
User avatar
tsquillario
 
Posts: 206
Joined: Thu Jun 30, 2011 5:10 pm
Location: State College, PA


Return to Help

Who is online

Users browsing this forum: No registered users and 15 guests