public class BusinessEventConnectionFactorySupport extends Object
Constructor and Description |
---|
BusinessEventConnectionFactorySupport() |
Modifier and Type | Method and Description |
---|---|
static BusinessEventConnectionFactory |
findRelevantBusinessEventConnectionFactory(boolean forceRetry)
Find Event Connection Factory object relevant to the underlying EDN JMS type (WLSJMS or AQJMS) and client environment set up.
|
static void |
reset()
Reset to the initial state, i.e.
|
static void |
setDatasourceProperties(Properties p)
Specify custom JDBC data source properties (typically to overwrite default EDN JDBC data sources) for FA/AQ client to communicate with AQJMS topic based EDN.
|
static void |
setJcaConnectionFactories(Properties p)
Custom JMS Connection Factories used by JCA adapter (typically to overwrite default JMS Connection Factories used by JCA adapter) for J2EE client (e.g.
|
static void |
setJmsMapping(Properties p)
Set custom JMS topic and JMS connection factories (to overwrite default mapping) for J2SE client (e.g.
|
static void |
setJndiProperties(Properties p)
Specify standard JNDI properties pointing to SOA server.
|
public static final String JDNI_DEFAULT_USER_TRANSACTION
public static final String EDN_JMS_TOPIC_KEY
public static final String EDN_JMS_CONNECTION_FACTORY_KEY
public static final String EDN_JMS_XA_CONNECTION_FACTORY_KEY
public static final String EDN_USER_TRANSACTION_KEY
public static final String JNDI_DEFAULT_WLS_JCA_XA_CONN_FACTORY
public static final String JNDI_DEFAULT_WLS_JCA_DURABLE_XA_CONN_FACTORY
public static final String JNDI_DEFAULT_WLS_JCA_LOCALTX_CONN_FACTORY
public static final String JNDI_DEFAULT_WLS_JCA_DURABLE_LOCALTX_CONN_FACTORY
public static final String EDN_JCA_XA_CONN_FACTORY_KEY
public static final String EDN_JCA_DURABLE_XA_CONN_FACTORY_KEY
public static final String EDN_JCA_LOCALTX_CONN_FACTORY_KEY
public static final String EDN_JCA_DURABLE_LOCALTX_CONN_FACTORY_KEY
public static String JNDI_TOPIC_NAME
public static String JNDI_JMS_CONNECTION_FACTORY_NAME
public static String JNDI_XA_JMS_CONNECTION_FACTORY_NAME
public static final String JNDI_LOGICAL_DATASOURCE_NAME
public static final String JNDI_LOGICAL_LOCAL_TX_DATASOURCE_NAME
public static final String JNDI_DATASOURCE_NAME
public static final String JNDI_LOCAL_TX_DATASOURCE_NAME
public static final String JNDI_OLD_DATASOURCE_NAME
public static final String JNDI_OLD_LOCAL_TX_DATASOURCE_NAME
public static final String EDN_XA_DATASOURCE_KEY
public static final String EDN_LOCALTX_DATASOURCE_KEY
public BusinessEventConnectionFactorySupport()
public static void setJndiProperties(Properties p)
p
- Standard java.naming.InitialContext parameters pointing to SOA server.public static void setJmsMapping(Properties p)
p
- Custom JMS topic and JMS connection factories. Allowed keys are "edn.jms.topic", "edn.jms.connection-factory", "edn.jms.xa-connection-factory" and "edn.jms.user-transaction". Values are JNDI names for the corresponding key property. Note that "edn.jms.user-transaction" and "edn.jms.xa-connection-factory" values may be omitted together if XA is not used.EDN_JMS_TOPIC_KEY
, EDN_JMS_CONNECTION_FACTORY_KEY
, EDN_JMS_XA_CONNECTION_FACTORY_KEY
, EDN_USER_TRANSACTION_KEY
public static void setJcaConnectionFactories(Properties p)
p
- Custom JMS Connection Factories used by JCA adapter. Allowed keys are "edn.jca.xa-connection-factory", "edn.jca.durable-xa-connection-factory", "edn.jca.localtx-connection-factory" and "edn.jca.durable-localtx-connection-factory". Values are JMS connection factory (used by JMS adapter) JNDI names for the corresponding key property.public static void setDatasourceProperties(Properties p)
This is typically used for an EDN client (e.g. FA ADF client) who wants to pub/sub to AQJMS based EDN.
Allowed keys are "edn.xa-datasource", "edn.localtx-datasource", and "edn.jms.user-transaction".
Values are JNDI names for the corresponding key property.
p
- Custom data source properties for FA/AQ clientEDN_XA_DATASOURCE_KEY
, EDN_LOCALTX_DATASOURCE_KEY
, EDN_USER_TRANSACTION_KEY
public static BusinessEventConnectionFactory findRelevantBusinessEventConnectionFactory(boolean forceRetry) throws oracle.fabric.common.FabricException
(1) if co-located with SOA server, i.e. SoaInfraRegistry.get("EventConnectionFactory") is not null, then returns the co-located local event connection factory instance, which is typically the EDN EventBus instance.
(2) if specific JNDI properties for EdnJmsConnectionFactory is given via setJndiProperties(Properties)
with optional custom JMS mapping via setJmsMapping(Properties)
, then return EdnJmsConnectionFactory instance.
(3) if data source properties for EdnAqConnectionFactory is specified via setDatasourceProperties(Properties)
to overwrite default EDN JDBC data sources, then return EdnAqConnectionFactory instance.
(4) if custom JCA connection factories are given via setJcaConnectionFactories(Properties)
, then return EdnJcaConnectionFactory instance
(5) if default JCA connection factory set (WLJMS) are configured, i.e. JNDI_DEFAULT_WLS_JCA_XA_CONN_FACTORY
, JNDI_DEFAULT_WLS_JCA_DURABLE_XA_CONN_FACTORY
, JNDI_DEFAULT_WLS_JCA_LOCALTX_CONN_FACTORY
, JNDI_DEFAULT_WLS_JCA_DURABLE_LOCALTX_CONN_FACTORY
, then return EdnJcaConnectionFactory instance
(6) look up EDN JDBC datasources in following order, and if found, return EdnAqConnectionFactory instance.
(6-1) Logical datasources: "java:comp/env/jdbc/EDNLogicalDataSource", "java:comp/env/jdbc/EDNLogicalLocalTxDataSource"
(6-2) Typical datasources: "jdbc/SOADataSource", "jdbc/SOALocalTxDataSource"
(6-3) Legacy datasources: "jdbc/EDNSource", "jdbc/EDNLocalTxSource"
forceRetry
- Whether or not to enforce lookup retry. If this flag is set to false, then first time lookup is always performed and returned, and subsequent invoke returns cached factory instance from previous lookup(even if null). Otherwise, lookup will always be performed regardless of previous lookup.oracle.fabric.common.FabricException
- if fabric exception occurspublic static void reset()