Skip to content

Commit

Permalink
Improve Connection Manager configuration (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi authored Nov 3, 2023
1 parent a90eb19 commit f54379e
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 14 deletions.
171 changes: 171 additions & 0 deletions docs/modules/ROOT/pages/includes/quarkus-ironjacamar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,177 @@ endif::add-copy-button-to-env-var[]
|`failing-connection-only`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.sharable]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.sharable[quarkus.ironjacamar.ra.cm.sharable]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.sharable[quarkus.ironjacamar."resource-adapter-name".ra.cm.sharable]`


[.description]
--
Whether the connection manager is sharable

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_SHARABLE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_SHARABLE+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.enlistment]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.enlistment[quarkus.ironjacamar.ra.cm.enlistment]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.enlistment[quarkus.ironjacamar."resource-adapter-name".ra.cm.enlistment]`


[.description]
--
Whether the connection manager should enlist connections

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_ENLISTMENT+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_ENLISTMENT+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.connectable]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.connectable[quarkus.ironjacamar.ra.cm.connectable]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.connectable[quarkus.ironjacamar."resource-adapter-name".ra.cm.connectable]`


[.description]
--
Whether the connection manager should be connectable

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_CONNECTABLE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_CONNECTABLE+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.tracking]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.tracking[quarkus.ironjacamar.ra.cm.tracking]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.tracking[quarkus.ironjacamar."resource-adapter-name".ra.cm.tracking]`


[.description]
--
Whether the connection manager should track connections

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_TRACKING+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_TRACKING+++`
endif::add-copy-button-to-env-var[]
--|boolean
|


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.use-ccm]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.use-ccm[quarkus.ironjacamar.ra.cm.use-ccm]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.use-ccm[quarkus.ironjacamar."resource-adapter-name".ra.cm.use-ccm]`


[.description]
--
Whether the connection manager should use CCM

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_USE_CCM+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_USE_CCM+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.interleaving]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.interleaving[quarkus.ironjacamar.ra.cm.interleaving]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.interleaving[quarkus.ironjacamar."resource-adapter-name".ra.cm.interleaving]`


[.description]
--
Whether the connection manager should use interleaving

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_INTERLEAVING+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_INTERLEAVING+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.is-same-rm-override]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.is-same-rm-override[quarkus.ironjacamar.ra.cm.is-same-rm-override]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.is-same-rm-override[quarkus.ironjacamar."resource-adapter-name".ra.cm.is-same-rm-override]`


[.description]
--
Whether the connection manager should use same RM override

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_IS_SAME_RM_OVERRIDE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_IS_SAME_RM_OVERRIDE+++`
endif::add-copy-button-to-env-var[]
--|boolean
|


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.wrap-xa-resource]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.wrap-xa-resource[quarkus.ironjacamar.ra.cm.wrap-xa-resource]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.wrap-xa-resource[quarkus.ironjacamar."resource-adapter-name".ra.cm.wrap-xa-resource]`


[.description]
--
Whether the connection manager should wrap the XAResource

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_WRAP_XA_RESOURCE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_WRAP_XA_RESOURCE+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`true`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pad-xid]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pad-xid[quarkus.ironjacamar.ra.cm.pad-xid]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pad-xid[quarkus.ironjacamar."resource-adapter-name".ra.cm.pad-xid]`


[.description]
--
Whether the connection manager should pad the XID

ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_IRONJACAMAR_RA_CM_PAD_XID+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_IRONJACAMAR_RA_CM_PAD_XID+++`
endif::add-copy-button-to-env-var[]
--|boolean
|`false`


a| [[quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pool.strategy]]`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pool.strategy[quarkus.ironjacamar.ra.cm.pool.strategy]`

`link:#quarkus-ironjacamar_quarkus.ironjacamar.ra.cm.pool.strategy[quarkus.ironjacamar."resource-adapter-name".ra.cm.pool.strategy]`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public ConnectionManager createConnectionManager(String id, ManagedConnectionFac
pool,
null,
null,
Defaults.USE_CCM,
config.useCcm(),
ccm,
Defaults.SHARABLE,
Defaults.ENLISTMENT,
Defaults.CONNECTABLE,
Defaults.TRACKING,
config.sharable(),
config.enlistment(),
config.connectable(),
config.tracking().orElse(Defaults.TRACKING),
config.flushStrategy(),
config.allocationRetry(),
config.allocationRetryWait().toMillis());
Expand All @@ -60,22 +60,22 @@ public ConnectionManager createConnectionManager(String id, ManagedConnectionFac
pool,
null,
null,
Defaults.USE_CCM,
config.useCcm(),
ccm,
Defaults.SHARABLE,
Defaults.ENLISTMENT,
Defaults.CONNECTABLE,
Defaults.TRACKING,
config.sharable(),
config.enlistment(),
config.connectable(),
config.tracking().orElse(Defaults.TRACKING),
new org.jboss.jca.core.api.management.ConnectionManager(id),
config.flushStrategy(),
config.allocationRetry(),
config.allocationRetryWait().toMillis(),
transactionIntegration,
Defaults.INTERLEAVING,
config.interleaving(),
config.xaResourceTimeout().toSecondsPart(),
Defaults.IS_SAME_RM_OVERRIDE,
Defaults.WRAP_XA_RESOURCE,
Defaults.PAD_XID);
config.isSameRMOverride().orElse(Defaults.IS_SAME_RM_OVERRIDE),
config.wrapXAResource(),
config.padXid());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,58 @@ interface ConnectionManagerConfig {
@WithDefault("failing-connection-only")
FlushStrategy flushStrategy();

/**
* Whether the connection manager is sharable
*/
@WithDefault("true")
boolean sharable();

/**
* Whether the connection manager should enlist connections
*/
@WithDefault("true")
boolean enlistment();

/**
* Whether the connection manager should be connectable
*/
@WithDefault("false")
boolean connectable();

/**
* Whether the connection manager should track connections
*/
Optional<Boolean> tracking();

/**
* Whether the connection manager should use CCM
*/
@WithDefault("true")
boolean useCcm();

/**
* Whether the connection manager should use interleaving
*/
@WithDefault("false")
boolean interleaving();

/**
* Whether the connection manager should use same RM override
*/
Optional<Boolean> isSameRMOverride();

/**
* Whether the connection manager should wrap the XAResource
*/
@WithDefault("true")
boolean wrapXAResource();

/**
* Whether the connection manager should pad the XID
*/
@WithDefault("false")
boolean padXid();

/**
* The pool configuration for the Connection Manager
*/
Expand Down

0 comments on commit f54379e

Please sign in to comment.