Resource Type: wls_datasource

Defined in:
lib/puppet/type/wls_datasource.rb
Providers:
simple

Overview

This resource allows you to manage a datasource in an WebLogic domain.

Here is an example on how you should use this:

# this will use default as wls_setting identifier, no XA properties
wls_datasource { 'hrDS':
  ensure                           => 'present',
  connectioncreationretryfrequency => '0',
  drivername                       => 'oracle.jdbc.xa.client.OracleXADataSource',
  extraproperties                  => ['SendStreamAsBlob=true', 'oracle.net.CONNECT_TIMEOUT=10001'],
  fanenabled                       => '0',
  globaltransactionsprotocol       => 'TwoPhaseCommit',
  initialcapacity                  => '2',
  initsql                          => 'None',
  jndinames                        => ['jdbc/hrDS', 'jdbc/hrDS2'],
  maxcapacity                      => '15',
  mincapacity                      => 1,
  rowprefetchenabled               => '0',
  rowprefetchsize                  => '48',
  secondstotrustidlepoolconnection => '10',
  statementcachesize               => '10',
  target                           => ['wlsServer1', 'wlsServer2'],
  targettype                       => ['Server', 'Server'],
  testconnectionsonreserve         => '0',
  testfrequency                    => '120',
  testtablename                    => 'SQL SELECT 1 FROM DUAL',
  url                              => 'jdbc:oracle:thin:@dbagent2.alfa.local:1521/test.oracle.com',
  user                             => 'hr',
  usexa                            => '0',
}

In this example you are managing a datasource in the default domain. When you want to manage a datasource in a specific domain, you can use:

# this will use default as wls_setting identifier, no XA properties
wls_datasource{'mydomain/hrDS':
  ...
  ensure                           => 'present',
  connectioncreationretryfrequency => '0',
  drivername                       => 'oracle.jdbc.xa.client.OracleXADataSource',
  ...
}

Check the [WebLogic documentation](docs.oracle.com/middleware/1212/wls/INTRO/jdbc.htm#INTRO215) for more information about configuring and managing datasources.

Properties

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent

Parameters

  • provider

    The specific backend to use for this ‘wls_datasource` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.