Servis-Rhino 4211B Guide de l'utilisateur Page 81

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 298
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 80
Password – The password for the user used to connect to the database.
The definitions for the adapter are saved in its XML configuration file called <Adapter>.xml.
This will contain an XML section called <dataSourceDefinition> under the
<connectionPolicy> element. For example:
<connectivity>
<connectionPolicy xsi:type="sql:SQLConnectionPolicy">
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/mydb</url>
<user>myUsername</user>
<password>myPassword</password>
</dataSourceDefinition>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="5" />
</connectivity>
See also:
Creating SQL Adapter in IBM Worklight – 2013-08-18
IBM Worklight v6.0.0. Getting Started – SQL Adapter – Communicating with SQL Database – 2013-07-12
Database JDBC Drivers
In order to use the SQL Adapter, you will need the corresponding JDBC driver class file supplied
by the database vendor. You should always check the appropriate vendor documentation for
details.
See also:
IBM DB2 JDBC Driver Versions
Oracle JDBC Drivers
MySQL Connector/J – JDBC driver for MySQL
SQL Adapter Procedure implementations
Once the adapter definition has been made, the next step will be to define the adapter procedures
that are to be exposed to the client caller. Each of these will be named JavaScript functions and
corresponding XML configuration file definitions.
The body of the JavaScript function will then make Worklight provided server side API calls to
interact with the back-end database. There are three calls that are of interest to us:
WL.Server.invokeSQLStoredProcedure() - Invoke a database stored procedure.
WL.Server.createSQLStatement() - Create a SQL prepared statement.
WL.Server.invokeSQLStatement() - Invoke a SQL statement on the database.
See also:
WL.Server.invokeSQLStoredProcedure(options)
WL.Server.createSQLStatement(statement)
WL.Server.invokeSQLStatement(options)
Cast Iron Adapter
Page 81
Vue de la page 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 297 298

Commentaires sur ces manuels

Pas de commentaire