Configuring SQLFire as a JDBC Datasource

The SQLFire JDBC implementation enables you to use a distributed system as an embedded JDBC datasource in products such as WebLogic Server.


Follow this general procedure when setting up SQLFire as a datasource in a third-party product:
  1. For products such as WebLogic Server that provide datasource templates, select "Apache Derby" or "Other" as the database type if vFabric SQLFire is not explicitly supported.
  2. Specify "sqlfire" as the database name. This represents a single SQLFire distributed system. (SQLFire does not contain multiple databases as in Apache Derby or other relational database systems.)
  3. For the hostname and port, specify the hostname and port combination of a SQLFire locator or a SQLFire server. This is the same hostname and port combination you would use to connect as a client from the sqlf prompt.
  4. For the database username and password, enter a valid username and password combination if you have enabled authentication in your system (using the -auth-provider property).

    If you have not configured authentication in SQLFire, specify "app" as both the username and password values, or any other temporary value.

    Note: SQLFire uses the username specified in the JDBC connection as the schema name when you do not provide the schema name for a database object. SQLFire uses "APP" as the default schema. If your system does not enable authentication, you can specify "APP" for both the username and password to maintain consistency with the default schema behavior.
  5. For the driver class, specify: com.vmware.sqlfire.internal.jdbc.ClientDataSource
  6. The JDBC URL that you specify must begin with jdbc:sqlfire://. Remove any template properties such as create=true if they are present in the URL or properties fields.
    In products such as WebLogic, you cannot specify JDBC connection properties for an embedded datasource as part of the JDBC URL. Instead, use the properties field and specify connectionAttributes using the format:
    For example: connectionAttributes=mcast-address=;mcast-port=10334 or connectionAttributes=locators=;mcast-port=0

    See also the Apache Derby documentation for EmbeddedDataSource.

  7. A process can connect to only one SQLFire distributed system at a time. If you want to connect to a different SQLFire distributed system, shut down the current embedded data source before re-connecting with a different datasource.