Skip Headers
Oracle® Providers for ASP.NET Developer's Guide
11g Release 2 (11.2.0.3) for Microsoft Windows

Part Number E18737-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OracleWebEventProvider Class

The OracleWebEventProvider class allows ASP.NET applications to store Web events in an Oracle database.

Class Inheritance

System.Object

  System.Configuration.Provider.ProviderBase

    System.Web.Management.WebEventProvider

      System.Web.Management.BufferedWebEventProvider

        Oracle.Web.Management.OracleWebEventProvider

Declaration

// C#
public class OracleWebEventProvider: BufferedWebEventProvider

Thread Safety

All public static methods are thread-safe, although instance members are not guaranteed to be thread-safe.

Remarks

This class allows ASP.NET applications to store Web event information in an Oracle database.

Example

The following is a web.config example for an ASP.NET application that uses the OracleWebEventProvider class as the default provider. This configuration uses the connection string and default attribute values specified in the machine.config file.

Applications must provide any required configuration entries for event mapping, buffer modes, and rules in the web.config file, because the machine.config file does not provide these configuration entries. The following web.config file provides an example:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <system.web>
    <healthmonitoring enabled="true"/>
      <bufferModes>
        <add name="Notification"
             maxBufferSize="1000"
             maxFlushSize="200"
             urgentFlushThreshold="500"
             regularFlushInterval="00:00:6"
             urgentFlushInterval="00:00:03"
             maxBufferThreads="1"/>
      </bufferModes>
      <eventMappings>
        <add name="CustomEvent"
             type="CustomEventSource.CustomEvent, CustomEventSource"/>
      </eventMappings>
      <rules>
        <add name="CustomRule"
             eventName="CustomEvent"
             provider="OracleWebEventProvider"
             minInterval="00:00:00"/>
      </rules>
    </healthMonitoring>
  </system.web>
</configuration>

The following is a web.config example for an ASP.NET application that uses an OracleWebEventProvider class as the default provider, using customized settings for the connection string name and application name, and an application-specific connection string, along with other configurations as described in the previous example:

<?xml version="1.0"?>
<configuration xmlns=
  "http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
    <add name="my_webevent_app_con_string" connectionString=
      "User Id=scott;Password=tiger;Data Source=Oracle"/>
  </connectionStrings>
  <system.web>
    <!-- Enable and customize OracleWebEventProvider -->
    <healthMonitoring enabled="true">
      <providers>
        <add name="CustomOracleWebEventProvider"
             type="Oracle.Web.Management.OracleWebEventProvider,
                   Oracle.Web, Version=2.112.2.0, Culture=neutral,
                   PublicKeyToken=89b483f429c47342"
             connectionStringName="my_webevent_app_con_string"
             bufferMode="CustomBufferMode">
      </providers>
      <bufferModes>
        <add name="CustomBufferMode"
             maxBufferSize="1000"
             maxFlushSize="200"
             urgentFlushThreshold="500"
             regularFlushInterval="00:00:06"
             urgentFlushInterval="00:00:03"
             maxBufferThreads="1"/>
      </bufferModes>
      <eventMappings>
        <add name="CustomEvent"
             type="CustomEventSource.CustomEvent, CustomEventSource"/>
      </eventMappings>
      <rules>
        <add name="CustomRule"
             eventName="CustomEvent"
             provider="CustomOracleWebEventProvider"
             minInterval="00:00:00"/>
      </rules>
    </healthMonitoring>
  </system.web>
</configuration>

Note that the applicationName attribute should be set to a unique value for each ASP.NET application.

Requirements

Namespace: Oracle.Web.Management

Assembly: Oracle.Web.dll

Oracle Providers for ASP.NET Version: Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4


OracleWebEventProvider Members

OracleWebEventProvider members are listed in the following tables.

OracleWebEventProvider Constructors

The OracleWebEventProvider constructor is listed in Table 7-1.

Table 7-1 OracleWebEventProvider Constructor

Constructor Description

OracleWebEventProvider Constructors

Instantiates a new instance of the OracleWebEventProvider class


OracleWebEventProvider Static Methods

OracleWebEventProvider static methods are listed in Table 7-2.

Table 7-2 OracleWebEventProvider Static Methods

Static Methods Description

Equals

Inherited from System.Object (Overloaded)

ReferenceEquals

Inherited from System.Object


OracleWebEventProvider Public Properties

OracleWebEventProvider public properties are listed in Table 7-3.

Table 7-3 OracleWebEventProvider Public Properties

Public Properties Description

BufferMode

Inherited from System.Web.Management.BufferedWebEventProvider

CommandTimeout

Gets the number of seconds that the command is allowed to execute before it is terminated with an exception

Description

Inherited from System.Configuration.Provider.ProviderBase

Name

Inherited from System.Configuration.Provider.ProviderBase

UseBuffering

Inherited from System.Web.Management.BufferedWebEventProvider


OracleWebEventProvider Public Methods

OracleWebEventProvider public methods are listed in Table 7-4.

Table 7-4 OracleWebEventProvider Public Methods

Public Method Description

Initialize

Initializes the OracleWebEventProvider instance with the property values specified in the ASP.NET application configuration file

ProcessEvent

Processes the event passed to it as an argument

ProcessEventFlush

Flushes the information passed to it as an argument

Shutdown

Releases all resources

Flush

Inherited from System.BufferedWebEventProvider

Equals(Overloaded)

Inherited from System.Object

GetHashCode

Inherited from System.Object

GetType

Inherited from System.Object

ToString

Inherited from System.Object



OracleWebEventProvider Constructors

This constructor creates an instance of the OracleWebEventProvider class.

Overload List:

OracleWebEventProvider()

This constructor creates an instance of the OracleWebEventProvider class.

Declaration

// C#
public OracleWebEventProvider();

Remarks

This constructor creates a new instance of the OracleWebEventProvider class.


OracleWebEventProvider Static Methods

The OracleWebEventProvider static methods are listed in Table 7-5.

Table 7-5 OracleWebEventProvider Static Methods

Static Methods Description

Equals

Inherited from System.Object (Overloaded)

ReferenceEquals

Inherited from System.Object



OracleWebEventProvider Public Properties

The OracleWebEventProvider public properties are listed in Table 7-6.

Table 7-6 OracleWebEventProvider Public Properties

Public Properties Description

BufferMode

Inherited from System.Web.Management.BufferedWebEventProvider

CommandTimeout

Gets the number of seconds that the command is allowed to execute before it is terminated with an exception

Description

Inherited from System.Configuration.Provider.ProviderBase

Name

Inherited from System.Configuration.Provider.ProviderBase

UseBuffering

Inherited from System.Web.Management.BufferedWebEventProvider


CommandTimeout

This property gets the number of seconds that the command is allowed to execute before it is terminated with an exception.

Declaration

// C#
public int CommandTimeout {get;}
 

Property Value

An int.

Remarks

To customize a provider, ASP.NET developers can set an integer value for this property through the web.config file using the commandTimeout attribute.

The default value is 30 seconds. The attribute name in the configuration file is case-sensitive.


OracleWebEventProvider Public Methods

The OracleWebEventProvider public methods are listed in Table 7-7.

Table 7-7 OracleWebEventProvider Public Methods

Public Method Description

Initialize

Initializes the OracleWebEventProvider instance with the property values specified in the ASP.NET application configuration file

ProcessEvent

Processes the event passed to it as an argument

ProcessEventFlush

Flushes the information passed to it as an argument

Shutdown

Releases all resources

Flush

Inherited from System.BufferedWebEventProvider

Equals(Overloaded)

Inherited from System.Object

GetHashCode

Inherited from System.Object

GetType

Inherited from System.Object

ToString

Inherited from System.Object


Initialize

This method initializes the OracleWebEventProvider instance with the property values specified in the ASP.NET application configuration file (web.config).

Declaration

// C#
public override void Initialize(string name, NameValueCollection config);

Parameters

Exceptions

InvalidOperationException - If the OracleWebEventProvider instance is already initialized.

ProviderException - One of the following conditions exists:

Remarks

The Initialize method is not intended to be called directly by the application.

ProcessEvent

This method processes the event passed to it as an argument.

Declaration

// C#
public override void ProcessEvent(WebBaseEvent eventRaised);

Parameters

Remarks

This method is called by ASP.NET applications to start event processing. If buffering is enabled, then the event is added to the buffer of events, otherwise, the event information is directly written into Oracle Database.

ProcessEventFlush

This method flushes the information passed to it as an argument.

Declaration

// C#
public override void ProcessEventFlush(WebEventBufferFlushInfo flushEvent);

Parameters

Remarks

This method is called by ASP.NET applications to flush all events into Oracle Database.

Shutdown

This method releases all resources.

Declaration

// C#
public override void Shutdown();

Remarks

This method is called by ASP.NET applications when the provider is unloaded. All the buffered events are first flushed into Oracle Database before the provider proceeds with shutdown.