Class BusinessEventConnectionFactorySupport

java.lang.Object
oracle.integration.platform.blocks.event.BusinessEventConnectionFactorySupport

public class BusinessEventConnectionFactorySupport extends Object
Support class for lookup of BusinessEventConnection factory instance.
  • Field Details

  • Constructor Details

    • BusinessEventConnectionFactorySupport

      public BusinessEventConnectionFactorySupport()
  • Method Details

    • setJndiProperties

      public static void setJndiProperties(Properties p)
      Specify standard JNDI properties pointing to SOA server. This is invoked by an EDN client that runs in J2SE server environment and wants to use EDN public API to pub/sub events.
      Parameters:
      p - Standard java.naming.InitialContext parameters pointing to SOA server.
    • setJmsMapping

      public static void setJmsMapping(Properties p)
      Set custom JMS topic and JMS connection factories (to overwrite default mapping) for J2SE client (e.g. OEP) to interact with EDN.
      Parameters:
      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.
      See Also:
    • setJcaConnectionFactories

      public 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. OSB) to interact with EDN.
      Parameters:
      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.
    • setDatasourceProperties

      public 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.

      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.

      Parameters:
      p - Custom data source properties for FA/AQ client
      See Also:
    • findRelevantBusinessEventConnectionFactory

      public static BusinessEventConnectionFactory findRelevantBusinessEventConnectionFactory(boolean forceRetry) throws oracle.fabric.common.FabricException
      Find Event Connection Factory object relevant to the underlying EDN JMS type (WLSJMS or AQJMS) and client environment set up. Lookup of event connection factory instance is performed based on the following order:

      (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"

      Parameters:
      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.
      Returns:
      an event connection factory instance.
      Throws:
      oracle.fabric.common.FabricException - if fabric exception occurs
    • reset

      public static void reset()
      Reset to the initial state, i.e. no lookup has been performed and no specific properties are specified.