Class EdnAqConnection

java.lang.Object
oracle.integration.platform.blocks.event.jms2.BaseEdnConnection
oracle.integration.platform.blocks.event.jms2.EdnAqConnection
All Implemented Interfaces:
BusinessEventConnection, EdnConnection

public final class EdnAqConnection extends BaseEdnConnection
This class represents an EdnConnection implementation based on mid-tier JDBC API that interacts with a set of PL/SQL procedures for AQ-JMS. This is useful for migratability of FA, for example, without any configuration changes or new parameters introduced.
Since:
12.1.2
  • Constructor Details

    • EdnAqConnection

      public EdnAqConnection(DataSource xaDataSource, DataSource localTxDataSource, UserTransaction userTransaction)
      Construct a remote JMS Connection to EDN.
      Parameters:
      xaDataSource - - XA data source
      localTxDataSource - - Local transaction data source
      userTransaction - - UserTransaction object
  • Method Details

    • getUserTransaction

      public UserTransaction getUserTransaction()
      Get UserTranasction instance for XA.
      Returns:
      UserTranasction instance for XA.
    • setUserTransaction

      public void setUserTransaction(UserTransaction userTransaction)
      Set UserTranasction instance for XA.
      Parameters:
      userTransaction - - UserTranasction instance for XA.
    • close

      public void close() throws oracle.fabric.common.FabricException
      Description copied from interface: BusinessEventConnection
      Close the connection
      Specified by:
      close in interface BusinessEventConnection
      Overrides:
      close in class BaseEdnConnection
      Throws:
      oracle.fabric.common.FabricException - if fabric exception occurs
    • publishEvent

      public void publishEvent(BusinessEvent event) throws oracle.fabric.common.FabricException
      Description copied from interface: EdnConnection
      Publish an event with default persistent, priority, time to live, and EDL as input source.
      Specified by:
      publishEvent in interface EdnConnection
      Overrides:
      publishEvent in class BaseEdnConnection
      Parameters:
      event - Business Event to be published
      Throws:
      oracle.fabric.common.FabricException - If it fails to publish the event with default options.
    • publishEvent

      public void publishEvent(BusinessEvent event, int priority) throws oracle.fabric.common.FabricException
      Description copied from interface: BusinessEventConnection
      Publish an event with indicated priority
      Specified by:
      publishEvent in interface BusinessEventConnection
      Overrides:
      publishEvent in class BaseEdnConnection
      Parameters:
      event - - Business Event to be published
      priority - - event priority
      Throws:
      oracle.fabric.common.FabricException - if fabric exception occurs
    • publishEvent

      public void publishEvent(BusinessEvent event, boolean persistent, int priority, long timeToLive, String edlURI) throws oracle.fabric.common.FabricException
      Description copied from interface: EdnConnection
      Publish an event with specified delivery mode, priority, time to live, and EDL URI.
      Specified by:
      publishEvent in interface EdnConnection
      Overrides:
      publishEvent in class BaseEdnConnection
      Parameters:
      event - Business Event to be published
      persistent - Persistent (or non persistent) delivery mode
      priority - Event priority
      timeToLive - Time to live in milliseconds
      edlURI - URI with "oramds" referencing Event definition content
      Throws:
      oracle.fabric.common.FabricException - If it fails to publish the event with specified options.
    • unsubscribe

      public void unsubscribe(QName eventName, String durableSubscriptionName) throws oracle.fabric.common.FabricException
      Description copied from interface: EdnConnection
      Remove a durable subscription that has been created previously.
      Specified by:
      unsubscribe in interface EdnConnection
      Overrides:
      unsubscribe in class BaseEdnConnection
      Parameters:
      eventName - Event QName to unsubscribe to
      durableSubscriptionName - Durable subscription name whose subscription is to be removed.
      Throws:
      oracle.fabric.common.FabricException - if it fails to remove the durable subscription due to some internal error, or the subscription name is invalid.
    • subscribe

      public void subscribe(QName eventName, String durableSubscriptionName) throws oracle.fabric.common.FabricException
      Description copied from interface: EdnConnection
      Subscribe to events with specified event name (QName) and default consistency level, XPath filter (if a default one exists), timeout, and event handler that consumes subscribed events.

      Whether or not the subscription is durable depends on if the durableSubscriptionName is specified. Passing null or empty string as durableSubscriptionName indicates non-durable subscription.

      If durableSubscriptionName is specified, it first creates a durable subscription if the subscription has not been created previously. Then it attempts to receive an event.

      Note that the event receiving call blocks until an event arrives, or the timeout expires, or the connection is closed. A timeout value of 0 never expires, and the receive call blocks indefinitely. A negative timeout value means to receive the next event if one is immediately available without blocking.

      Specified by:
      subscribe in interface EdnConnection
      Overrides:
      subscribe in class BaseEdnConnection
      Parameters:
      eventName - Event QName to subscribe to
      durableSubscriptionName - Durable subscription name.
      Throws:
      oracle.fabric.common.FabricException - If it fails to subscribe to events with specified options.
    • subscribe

      public void subscribe(QName eventName, ConsistencyLevel qos, XPathFilter filter, BusinessEventHandler handler, boolean runAsPublisher, long timeout, String durableSubscriptionName) throws oracle.fabric.common.FabricException
      Description copied from interface: EdnConnection
      Subscribe to events with specified event name (QName), consistency level, XPath filter, and event handler that consumes subscribed events.

      Whether or not the subscription is durable depends on if the durableSubscriptionName is specified. Passing null or empty string as durableSubscriptionName indicates non-durable subscription.

      If durableSubscriptionName is specified, it first creates a durable subscription if the subscription has not been created previously. Then it attempts to receive an event.

      Note that the event receiving call blocks until an event arrives, or the timeout expires, or the connection is closed. A timeout value of 0 never expires, and the receive call blocks indefinitely. A negative timeout value means to receive the next event if one is immediately available without blocking.

      Specified by:
      subscribe in interface EdnConnection
      Overrides:
      subscribe in class BaseEdnConnection
      Parameters:
      eventName - Event QName to subscribe to
      qos - Delivery guarantee, either ConsistencyLevel.ONE_AND_ONLY_ONE or ConsistencyLevel.GUARANTEED_DELIVERY
      filter - XPath filter to limit events. This filter is convertible into JMS message selector to apply on events
      handler - Event handler to consume subscribed events.
      runAsPublisher - Whether or not to consume events as publisher's identity.
      timeout - Timeout value (in milliseconds). A value of 0 never expires, and this call blocks indefinitely. A negative value means to receive the next event if one is immediately available without blocking.
      durableSubscriptionName - Durable subscription name.
      Throws:
      oracle.fabric.common.FabricException - If it fails to subscribe to events with specified options.