Flower on a tree
This flower was found on a tree near by where Goran lives in Ljubljana, Slovenia.

Openfire database settings

One of the features of Tsuka, a module called “Mugamae”, is the chat application.

Here is an example configure file for Openfire chat backend which can be used with Tsuka beta. Some useful reading for the customisation of the database settings are available at IgniteRealtime web site.

<?xml version="1.0" encoding="UTF-8"?>

<jive>

  <adminConsole>

    <port>9090</port>

    <securePort>9091</securePort>

  </adminConsole>

  <admin>

    <authorizedUsernames>admin,jukkap</authorizedUsernames>

  </admin>

  <locale>en</locale>

  <provider>

    <auth>

      <className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className>

    </auth>

    <user>

      <className>org.jivesoftware.openfire.user.JDBCUserProvider</className>

    </user>

    <group>

      <className>org.jivesoftware.openfire.group.JDBCGroupProvider</className>

    </group>

  </provider>

  <connectionProvider>

    <className>org.jivesoftware.database.DefaultConnectionProvider</className>

  </connectionProvider>

  <jdbcProvider>

    <driver>com.mysql.jdbc.Driver</driver>

    <connectionString>jdbc:mysql://localhost:3306/tsukabeta?user=tsukabeta&password=tsukabeta</connectionString>

  </jdbcProvider>

  <jdbcAuthProvider>

    <passwordSQL>SELECT password FROM users WHERE username=? LIMIT 1</passwordSQL>

    <passwordType>sha1</passwordType>

  </jdbcAuthProvider>

  <jdbcUserProvider>

    <loadUserSQL>SELECT realname, email FROM users WHERE username = ? LIMIT 1</loadUserSQL>

    <userCountSQL>SELECT COUNT(*) FROM users</userCountSQL>

    <allUsersSQL>SELECT username FROM users ORDER BY username ASC</allUsersSQL>

    <searchSQL>SELECT username FROM users WHERE</searchSQL>

    <usernameField>username</usernameField>

    <nameField>realname</nameField>

    <emailField>email</emailField>

  </jdbcUserProvider>

  <jdbcGroupProvider>

    <groupCountSQL>SELECT COUNT(*) FROM groups</groupCountSQL>

    <allGroupsSQL>SELECT name FROM groups ORDER BY name ASC</allGroupsSQL>

    <userGroupsSQL>SELECT A.name FROM groups A, group_users B, users C WHERE A.id = B.group AND B.user = C.id AND C.username = ?</userGroupsSQL>

    <descriptionSQL>SELECT description FROM groups WHERE name = ?</descriptionSQL>

    <loadMembersSQL>SELECT A.username FROM users A, group_users B, groups C WHERE C.name = ? AND B.admin = 0 AND A.id = B.user AND B.group = C.id</loadMembersSQL>

    <loadAdminsSQL>SELECT A.username FROM users A, group_users B, groups C WHERE C.name = ? AND B.admin = 1 AND A.id = B.user AND B.group = C.id</loadAdminsSQL>

  </jdbcGroupProvider>

  <database>

    <defaultProvider>

      <driver>com.mysql.jdbc.Driver</driver>

      <serverURL>jdbc:mysql://localhost:3306/openfire350?characterEncoding=utf8</serverURL>

      <username>openfire350</username>

      <password>openfire350</password>

      <minConnections>5</minConnections>

      <maxConnections>15</maxConnections>

      <connectionTimeout>1.0</connectionTimeout>

    </defaultProvider>

  </database>

  <setup>true</setup>

  <log>

    <debug>

      <enabled>true</enabled>

    </debug>

  </log>

</jive>

The database I am using here for Openfire is called “openfire350”, where as the users and groups are fetched from “tsukabeta” database.