Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

getting users info using custom database integration?

$
0
0

Hi,

 

I want to get the users information from my database using openfire custom database integration  and the following is  my openfire.xml

 

Can any body please tell me what is the mistake here

 

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

 

 

<!--

    This file stores bootstrap properties needed by Openfire.

    Property names must be in the format: "prop.name.is.blah=value"

    That will be stored as:

        <prop>

            <name>

                <is>

                    <blah>value</blah>

                </is>

            </name>

        </prop>

 

 

    Most properties are stored in the Openfire database. A

    property viewer and editor is included in the admin console.

-->

<!-- root element, all properties must be under this element -->

<jive>

  <adminConsole>

    <!-- Disable either port by setting the value to -1 --> 

    <port>9090</port> 

    <securePort>9091</securePort>

  </adminConsole> 

  <locale>en</locale> 

  <!-- Network settings. By default, Openfire will bind to all network interfaces.

      Alternatively, you can specify a specific network interfaces that the server

      will listen on. For example, 127.0.0.1. This setting is generally only useful

       on multi-homed servers. --> 

  <!--

    <network>

        <interface></interface>

    </network>

    --> 

  <connectionProvider>

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

  </connectionProvider> 

  <database>

    <defaultProvider>

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

      <serverURL>jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true</ serverURL> 

      <username>root</username> 

      <password>123</password> 

      <testSQL>select 1</testSQL> 

      <testBeforeUse>false</testBeforeUse> 

      <testAfterUse>false</testAfterUse> 

      <minConnections>5</minConnections> 

      <maxConnections>25</maxConnections> 

      <connectionTimeout>1.0</connectionTimeout>

    </defaultProvider>

  </database> 

  <setup>true</setup> 

  <jdbcProvider>

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

    <connectionString>jdbc:mysql://localhost/openfire?user=root&amp;password=123</c onnectionString>

  </jdbcProvider> 

  <provider>

    <auth>

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

    </auth>

  </provider> 

  <jdbcAuthProvider>

    <passwordSQL>SELECT password FROM user WHERE username=?</passwordSQL> 

    <passwordType>sha256</passwordType>

  </jdbcAuthProvider> 

  <jdbcUserProvider>

    <loadUserSQL>SELECT name,email_address FROM user WHERE username=?</loadUserSQL> 

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

    <allUsersSQL>SELECT username FROM user</allUsersSQL> 

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

    <usernameField>username</usernameField> 

    <nameField>name</nameField> 

    <emailField>email</emailField>

  </jdbcUserProvider>

</jive>


Viewing all articles
Browse latest Browse all 10742

Trending Articles