Liking cljdoc? Tell your friends :D

buttle.xa-data-source

The Buttle javax.sql.XADataSource.

This namespace delivers buttle.jdbc.XADataSource via :gen-class. This named class can be used as an XA-datasource class for application servers.

Example (Wildfly):

  <xa-datasource jndi-name="java:/jdbc/buttle-xa" pool-name="buttle-xa">
    <xa-datasource-class>buttle.jdbc.XADataSource</xa-datasource-class>
    <driver>buttle-driver</driver>
    <security>
      <user-name>postgres-user</user-name>
      <password>postgres-password</password>
    </security>
    <xa-datasource-property name="DelegateSpec">
      {:delegate-class org.postgresql.xa.PGXADataSource
       :url "jdbc:postgresql://127.0.0.1:6632/postgres"}
    </xa-datasource-property>
  </xa-datasource>
The _Buttle_ `javax.sql.XADataSource`.

This namespace delivers `buttle.jdbc.XADataSource` via
`:gen-class`. This named class can be used as an XA-datasource class
for application servers.

__Example (Wildfly)__:


      <xa-datasource jndi-name="java:/jdbc/buttle-xa" pool-name="buttle-xa">
        <xa-datasource-class>buttle.jdbc.XADataSource</xa-datasource-class>
        <driver>buttle-driver</driver>
        <security>
          <user-name>postgres-user</user-name>
          <password>postgres-password</password>
        </security>
        <xa-datasource-property name="DelegateSpec">
          {:delegate-class org.postgresql.xa.PGXADataSource
           :url "jdbc:postgresql://127.0.0.1:6632/postgres"}
        </xa-datasource-property>
      </xa-datasource>
raw docstring

-getLoginTimeoutclj

(-getLoginTimeout this)

Implements javax.sql.CommonDataSource/getLoginTimeout. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.CommonDataSource/getLoginTimeout`. Just
delegates to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

-getLogWriterclj

(-getLogWriter this)

Implements javax.sql.CommonDataSource/getLogWriter. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.CommonDataSource/getLogWriter`. Just
delegates to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

-getParentLoggerclj

(-getParentLogger this)

Implements javax.sql.CommonDataSource/getParentLogger. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.CommonDataSource/getParentLogger`. Just
delegates to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

-getXAConnectionclj

(-getXAConnection this)
(-getXAConnection this username password)

Implements javax.sql.XADataSource/getXAConnection. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.XADataSource/getXAConnection`. Just delegates
to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

-initclj

(-init)

Constructor function of buttle.jdbc.XADataSource. Calls make-xa-data-source and initialized state with that (i.e. the Buttle XA-datasource is cached).

Constructor function of `buttle.jdbc.XADataSource`. Calls
`make-xa-data-source` and initialized `state` with that (i.e. the
_Buttle_ XA-datasource is cached).
sourceraw docstring

-setDelegateSpecclj

(-setDelegateSpec this spec)

Implements buttle.xa_data_source.ButtleDataSource/setDelegateSpec. Just delegates to the referenced/internal Buttle XA-datasource (see -init).

Implements
`buttle.xa_data_source.ButtleDataSource/setDelegateSpec`. Just
delegates to the referenced/internal _Buttle_ XA-datasource (see
`-init`).
sourceraw docstring

-setLoginTimeoutclj

(-setLoginTimeout this sec)

Implements javax.sql.CommonDataSource/setLoginTimeout. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.CommonDataSource/setLoginTimeout`. Just
delegates to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

-setLogWriterclj

(-setLogWriter this pr-wrt)

Implements javax.sql.CommonDataSource/setLogWriter. Just delegates to the referenced/internal XA-datasource (see -init).

Implements `javax.sql.CommonDataSource/setLogWriter`. Just
delegates to the referenced/internal XA-datasource (see `-init`).
sourceraw docstring

make-xa-data-sourceclj

(make-xa-data-source)

Creates and returns a Buttle javax.sql.XADataSource.

Use setDelegateSpec to control what the real (or backing) javax.sql.XADataSource is. You can use String to use an XA-datasource from JNDI. Use a map to create an instance and set properties (see retrieve-xa-data-soure for details).

Note: creation is done on-demand when the backing XA-datasource is actually needed/used.

Creates and returns a _Buttle_ `javax.sql.XADataSource`.

Use `setDelegateSpec` to control what the _real_ (or _backing_)
`javax.sql.XADataSource` is. You can use `String` to use an
XA-datasource from JNDI. Use a map to create an instance and set
properties (see `retrieve-xa-data-soure` for details).

Note: creation is done on-demand when the backing XA-datasource is
actually needed/used.
sourceraw docstring

retrieve-xa-data-sourecljmultimethod

Factory/lookup for real XA-datasource. String arg will be expected to be JNDI name of a javax.sql.XADataSource. In this case the XA-datasource will be looked up in JNDI. If the arg is a map the class-typed :delegate-class will be used to create an instance and then all remaining keys/values will be used to set the instance's Java-Bean properties.

Factory/lookup for _real_ XA-datasource. `String` arg will be
expected to be JNDI name of a `javax.sql.XADataSource`. In this case
the XA-datasource will be looked up in JNDI. If the arg is a map the
class-typed `:delegate-class` will be used to create an instance and
then all remaining keys/values will be used to set the instance's
Java-Bean properties.
sourceraw docstring

spec->typeclj

(spec->type spec)

Dispatch for retrieve-xa-data-soure. Returns type of spec (:jndi for String, :xa-class for maps).

Dispatch for `retrieve-xa-data-soure`. Returns type of
`spec` (`:jndi` for `String`, `:xa-class` for maps).
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close