[solved] Using same Java extension in multiple zones
Posted: 07 Nov 2013, 15:18
I want to run two different zones on a SFS server, using the same extension but different DB-managers. I set this up and I see both zones are running but it seems like both are using the same DB manager, and the same zone. e.g. I connect to zone_2 but the player logs into the lobby for zone_1.
My XML looks a bit like this:
It seems like only a single instance of the extension is being created, and shared singleton-style.
Is what I'm trying to do allowed and if so are there any known problems... of course it's possible my code is to blame but I want to check this first..
My XML looks a bit like this:
Code: Select all
<Zone name="game" uCountUpdate="false" buddyList="20" maxUsers="100" customLogin="true" roomListVars="true">
<MaxRoomNamesLen>40</MaxRoomNamesLen>
<MaxUserNamesLen>40</MaxUserNamesLen>
<Rooms>
<Room name="lobby" isGame="false" maxUsers="100" isPrivate="false" isTemp="false" autoJoin="true" />
</Rooms>
<Extensions>
<extension name="game" className="johnnyd.server.GameServer" type="java" />
</Extensions>
<AutoReloadExtensions>false</AutoReloadExtensions>
<DatabaseManager active="true">
<Driver>com.mysql.jdbc.Driver</Driver>
<ConnectionString>jdbc:mysql://localhost:3306/gameDB</ConnectionString>
Code: Select all
<Zone name="game_test" uCountUpdate="false" buddyList="20" maxUsers="100" customLogin="true" roomListVars="true">
<MaxRoomNamesLen>40</MaxRoomNamesLen>
<MaxUserNamesLen>40</MaxUserNamesLen>
<Rooms>
<Room name="lobby" isGame="false" maxUsers="100" isPrivate="false" isTemp="false" autoJoin="true" />
</Rooms>
<Extensions>
<extension name="game_test" className="johnnyd.server.GameServer" type="java" />
</Extensions>
<AutoReloadExtensions>false</AutoReloadExtensions>
<DatabaseManager active="true">
<Driver>com.mysql.jdbc.Driver</Driver>
<ConnectionString>jdbc:mysql://localhost:3306/testDB</ConnectionString>
It seems like only a single instance of the extension is being created, and shared singleton-style.
Is what I'm trying to do allowed and if so are there any known problems... of course it's possible my code is to blame but I want to check this first..