BasicExamples.zone.xml file documentation?

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

Moderators: Lapo, Bax

User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

BasicExamples.zone.xml file documentation?

Postby Carl Lydon » 03 Jul 2012, 19:05

I'm just breaking into Java extensions (previously only did javascript/as1 extensions)

I can't seem to find any documentation at all on editing the "BasicExamples.zone.xml" file either through google or the search on this site.

Specifically I would like to see an example of loading a room extension using this file. I know you can use the admin tool but it seems you could also do it by adding the jar here, as one might add an extension using a config file in SF 1.6x?

Under room in xml file I see:


Code: Select all

<extension>
        <name></name>
        <type>JAVA</type>
        <file></file>
        <propertiesFile></propertiesFile>
        <reloadMode>AUTO</reloadMode>
 </extension>


I made a test extension:

SFS2X/extensions/tides/tides.jar

I changed xml to:

Code: Select all

<extension>
        <name>tidesExt</name>
        <type>JAVA</type>
        <file>tides</file>
        <propertiesFile></propertiesFile>
        <reloadMode>AUTO</reloadMode>
 </extension>


I also tried tides.tides for path, and various different combos for name and path. When I run the server I get:

- Error while creating Room: TidesLogin -> Room Extension creation failure: tides - Class not found:


Could someone tell me how to write this path correctly, or point me to some docs for this xml file?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: BasicExamples.zone.xml file documentation?

Postby rjgtav » 03 Jul 2012, 20:16

Hi.
Well, there's no documentation available about how to configure the Zone's configuration files' manually because, as you said, it is meant to always use the AdminTool.
Here's a little example of how the configuration file looks like when you attach an extension:

Code: Select all

<extension>
    <name>TestExtension</name>
    <type>JAVA</type>
    <file>ZoneMain.TestExtension</file>
    <propertiesFile></propertiesFile>
    <reloadMode>AUTO</reloadMode>
  </extension>


And here's my simple extension's structure:
TestExtension Structure.PNG
A simple extension's structure
(6.58 KiB) Not downloaded yet
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: BasicExamples.zone.xml file documentation?

Postby Carl Lydon » 03 Jul 2012, 20:19

Thank you very, very much. I will study this. I was coming to realize that the admin tool actually edits this file, which I didn't know going into it.

One question about your file structure: I thought extensions had to be in the SFS2X/extensions folder?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: BasicExamples.zone.xml file documentation?

Postby rjgtav » 03 Jul 2012, 22:03

Oh sorry, it isn't the file structure. I just pasted the class structure.
My extension's jar is then inside the SFS2X\extensions\TestExtension folder, which corresponds to the name parameter you have on the config file.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor, Thomasea and 52 guests