I have 2 problems that i hope can be solved fast:
The first one is about an Extension in java that manages login requests.
i found this documentation: http://www.smartfoxserver.com/docs/docP ... /index.htm
However this is not in java, i managed to recive from a client his nick, password and zone with:
Code: Select all
if(ieo.getEventName() == "loginRequest")
{
String username = ieo.getParam("nick");
}
The second problem is:
i created a database withe the H2 dbms and in the config file i put these strings:
Code: Select all
<DatabaseManager active="true">
<Driver>sun.jdbc.odbc.JdbcOdbcDriver</Driver>
<ConnectionString>jdbc:h2:~/mydatabase</ConnectionString>
<UserName>user</UserName>
<Password>password</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM USERS]]></TestSQL>
<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
Then in the java extension i used the DbManager this way:
Code: Select all
DbManager dbm = new DbManager("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:h2:~/mydatabase", "username", "passwod", "myZone", 10, 10, "fail", 5000);
ArrayList al = dbm.executeQuery("SELECT * FROM users");
Thanks