disable room extension classloader

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

disable room extension classloader

Postby grhwood » 18 Jan 2014, 16:47

Hi,

Is it possiable to disable the room classloader so that eachtime a room is created it wont load new classes in to permgen space ?

Thanks,
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: disable room extension classloader

Postby Lapo » 19 Jan 2014, 09:50

Yes, by deploying the Room Extension in the extension/__lib__/ folder
We explain all the details here:
http://docs2x.smartfoxserver.com/Advanc ... assLoading
Lapo
--
gotoAndPlay()
...addicted to flash games
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: disable room extension classloader

Postby grhwood » 29 Jan 2014, 16:55

I have different folder for room and zone extension. zone ext jars are deployed in zone-ext folder and room ext jars are deployed in room-ext folder.
I have moved the room ext jars to __lib__ folder but when I create room I have this error:

Code: Select all

Message: Extension boot error. Unexpected: no jars were located!
Description: Failure while creating room extension.
Possible Causes: If the CreateRoom request was sent from client make sure that the extension name matches the name of an existing extension
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.createJavaExtension(SFSExtensionManager.java:345)
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.createExtension(SFSExtensionManager.java:259)
com.smartfoxserver.v2.entities.managers.SFSRoomManager.createRoomExtension(SFSRoomManager.java:225)
com.smartfoxserver.v2.entities.managers.SFSRoomManager.createRoom(SFSRoomManager.java:171)
com.smartfoxserver.v2.entities.SFSZone.createRoom(SFSZone.java:232)



Thanks,
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: disable room extension classloader

Postby Lapo » 29 Jan 2014, 17:30

Can you show me the parameters you are passing to create the Extension in the Room? (be it Admin config or code)
Lapo

--

gotoAndPlay()

...addicted to flash games
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: disable room extension classloader

Postby grhwood » 29 Jan 2014, 19:43

Hi Lapo,

Here is my code to create room:

Code: Select all

RoomExtensionSettings extensionSettings = new RoomExtensionSettings("room-ext", "extClassName");

CreateSFSGameSettings gameSettings = new CreateSFSGameSettings();
gameSettings.setGame(true);
gameSettings.setDynamic(true);
gameSettings.setLeaveLastJoinedRoom(true);
gameSettings.setExtension(extensionSettings);   



When I place ext jars in room-ext folder, it is ok.

Thanks,
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: disable room extension classloader

Postby Lapo » 29 Jan 2014, 21:03

The problem is that "room-ext" should be "__lib__"

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DerikFent, Google [Bot], JerodSa, Kevengar and 22 guests