Allow the throwing of Exception rather than IOException during the server
init process. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@360 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
//
|
//
|
||||||
// $Id: CrowdServer.java,v 1.6 2001/08/08 23:48:51 mdb Exp $
|
// $Id: CrowdServer.java,v 1.7 2001/09/28 22:32:28 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cocktail.party.server;
|
package com.threerings.cocktail.party.server;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import com.threerings.cocktail.cher.server.CherServer;
|
import com.threerings.cocktail.cher.server.CherServer;
|
||||||
@@ -27,7 +26,7 @@ public class PartyServer extends CherServer
|
|||||||
* Initializes all of the server services and prepares for operation.
|
* Initializes all of the server services and prepares for operation.
|
||||||
*/
|
*/
|
||||||
public void init ()
|
public void init ()
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
// do the cher server initialization
|
// do the cher server initialization
|
||||||
super.init();
|
super.init();
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
//
|
//
|
||||||
// $Id: PresentsServer.java,v 1.12 2001/08/08 23:56:20 mdb Exp $
|
// $Id: PresentsServer.java,v 1.13 2001/09/28 22:32:28 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cocktail.cher.server;
|
package com.threerings.cocktail.cher.server;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import com.samskivert.util.Config;
|
import com.samskivert.util.Config;
|
||||||
|
|
||||||
import com.threerings.cocktail.cher.Log;
|
import com.threerings.cocktail.cher.Log;
|
||||||
@@ -51,7 +50,7 @@ public class CherServer
|
|||||||
* Initializes all of the server services and prepares for operation.
|
* Initializes all of the server services and prepares for operation.
|
||||||
*/
|
*/
|
||||||
public void init ()
|
public void init ()
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
// create our configuration object
|
// create our configuration object
|
||||||
config = new Config();
|
config = new Config();
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
//
|
//
|
||||||
// $Id: WhirledServer.java,v 1.3 2001/09/28 22:23:48 mdb Exp $
|
// $Id: WhirledServer.java,v 1.4 2001/09/28 22:32:28 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.server;
|
package com.threerings.whirled.server;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import com.samskivert.jdbc.ConnectionProvider;
|
import com.samskivert.jdbc.ConnectionProvider;
|
||||||
import com.samskivert.jdbc.StaticConnectionProvider;
|
import com.samskivert.jdbc.StaticConnectionProvider;
|
||||||
import com.samskivert.util.Config;
|
import com.samskivert.util.Config;
|
||||||
@@ -34,7 +32,7 @@ public class WhirledServer extends PartyServer
|
|||||||
* Initializes all of the server services and prepares for operation.
|
* Initializes all of the server services and prepares for operation.
|
||||||
*/
|
*/
|
||||||
public void init ()
|
public void init ()
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
// do the cher server initialization
|
// do the cher server initialization
|
||||||
super.init();
|
super.init();
|
||||||
@@ -65,11 +63,11 @@ public class WhirledServer extends PartyServer
|
|||||||
* whirled server configuration and use those properties to create a
|
* whirled server configuration and use those properties to create a
|
||||||
* {@link com.samskivert.jdbc.StaticConnectionProvider}.
|
* {@link com.samskivert.jdbc.StaticConnectionProvider}.
|
||||||
*
|
*
|
||||||
* @exception IOException thrown if an error occurs creating the
|
* @exception Exception thrown if an error occurs creating the
|
||||||
* connection provider.
|
* connection provider.
|
||||||
*/
|
*/
|
||||||
protected ConnectionProvider createConnectionProvider (Config config)
|
protected ConnectionProvider createConnectionProvider (Config config)
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
String dbmap = config.getValue(DBMAP_KEY, DEF_DBMAP);
|
String dbmap = config.getValue(DBMAP_KEY, DEF_DBMAP);
|
||||||
return new StaticConnectionProvider(dbmap);
|
return new StaticConnectionProvider(dbmap);
|
||||||
@@ -81,12 +79,12 @@ public class WhirledServer extends PartyServer
|
|||||||
* (which they most likely will), they should override this method and
|
* (which they most likely will), they should override this method and
|
||||||
* instantiate the scene repository of their choosing.
|
* instantiate the scene repository of their choosing.
|
||||||
*
|
*
|
||||||
* @exception IOException thrown if any error occurs while
|
* @exception Exception thrown if any error occurs while instantiating
|
||||||
* instantiating or initializing the scene repository.
|
* or initializing the scene repository.
|
||||||
*/
|
*/
|
||||||
protected SceneRepository createSceneRepository (
|
protected SceneRepository createSceneRepository (
|
||||||
ConnectionProvider conprov)
|
ConnectionProvider conprov)
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
return new DummySceneRepository();
|
return new DummySceneRepository();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
//
|
//
|
||||||
// $Id: TestServer.java,v 1.2 2001/08/08 23:48:51 mdb Exp $
|
// $Id: TestServer.java,v 1.3 2001/09/28 22:32:28 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cocktail.cher.server.test;
|
package com.threerings.cocktail.cher.server.test;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import com.threerings.cocktail.cher.Log;
|
import com.threerings.cocktail.cher.Log;
|
||||||
import com.threerings.cocktail.cher.dobj.*;
|
import com.threerings.cocktail.cher.dobj.*;
|
||||||
import com.threerings.cocktail.cher.server.*;
|
import com.threerings.cocktail.cher.server.*;
|
||||||
@@ -17,7 +15,7 @@ public class TestServer extends CherServer
|
|||||||
public static TestObject testobj;
|
public static TestObject testobj;
|
||||||
|
|
||||||
public void init ()
|
public void init ()
|
||||||
throws IOException
|
throws Exception
|
||||||
{
|
{
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user