lib/puppet_x/coi/jboss/provider/datasource.rb
# Method that creates datasource in JBoss instance
Method that creates datasource in JBoss instance
Method that creates datasource in JBoss instance
def create
    cmd = ["#{create_delete_cmd} add --name=#{@resource[:name]}"]
    jta_opt(cmd)
    cmd.push "--jndi-name=#{@resource[:jndiname].inspect}"
    cmd.push "--driver-name=#{@resource[:drivername].inspect}"
    cmd.push "--min-pool-size=#{@resource[:minpoolsize].inspect}"
    cmd.push "--max-pool-size=#{@resource[:maxpoolsize].inspect}"
    cmd.push "--user-name=#{@resource[:username].inspect}"
    cmd.push "--password=#{@resource[:password].inspect}"
    if @resource[:xa]
      xa_properties = xa_datasource_properties_wrapper(create_xa_properties)
      cmd.push "--xa-datasource-properties=#{xa_properties}"
    else
      cmd.push "--connection-url=#{connection_url.inspect}"
    end
    @resource[:options].each do |attribute, value|
      cmd.push "--#{attribute}=#{value.inspect}"
    end
    bring_up 'Datasource', cmd.join(' ')
    setenabled true
  end
def create cmd = [ "#{create_delete_cmd} add --name=#{@resource[:name]}" ] jta_opt ( cmd ) cmd . push "--jndi-name=#{@resource[:jndiname].inspect}" cmd . push "--driver-name=#{@resource[:drivername].inspect}" cmd . push "--min-pool-size=#{@resource[:minpoolsize].inspect}" cmd . push "--max-pool-size=#{@resource[:maxpoolsize].inspect}" cmd . push "--user-name=#{@resource[:username].inspect}" cmd . push "--password=#{@resource[:password].inspect}" if @resource [ :xa ] xa_properties = xa_datasource_properties_wrapper ( create_xa_properties ) cmd . push "--xa-datasource-properties=#{xa_properties}" else cmd . push "--connection-url=#{connection_url.inspect}" end @resource [ :options ] . each do | attribute , value | cmd . push "--#{attribute}=#{value.inspect}" end bring_up 'Datasource' , cmd . join ( ' ' ) setenabled true end
Method that creates datasource in JBoss instance
Method that creates datasource in JBoss instance