Oracle® Providers for ASP.NET Developer's Guide 11g Release 2 (11.2.0.3) for Microsoft Windows Part Number E18737-02 |
|
|
PDF · Mobi · ePub |
The OracleWebEventProvider
class allows ASP.NET applications to store Web events in an Oracle database.
System.Object
System.Configuration.Provider.ProviderBase
System.Web.Management.WebEventProvider
System.Web.Management.BufferedWebEventProvider
Oracle.Web.Management.OracleWebEventProvider
// C# public class OracleWebEventProvider: BufferedWebEventProvider
All public static methods are thread-safe, although instance members are not guaranteed to be thread-safe.
This class allows ASP.NET applications to store Web event information in an Oracle database.
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.
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
See Also:
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 |
---|---|
Instantiates a new instance of the |
OracleWebEventProvider Static Methods
OracleWebEventProvider
static methods are listed in Table 7-2.
Table 7-2 OracleWebEventProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
OracleWebEventProvider Public Properties
OracleWebEventProvider
public properties are listed in Table 7-3.
Table 7-3 OracleWebEventProvider Public Properties
Public Properties | Description |
---|---|
|
Inherited from |
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
|
Inherited from |
|
Inherited from |
|
Inherited from |
OracleWebEventProvider Public Methods
OracleWebEventProvider
public methods are listed in Table 7-4.
Table 7-4 OracleWebEventProvider Public Methods
Public Method | Description |
---|---|
Initializes the |
|
Processes the event passed to it as an argument |
|
Flushes the information passed to it as an argument |
|
Releases all resources |
|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
This constructor creates an instance of the OracleWebEventProvider
class.
This constructor creates an instance of the OracleWebEventProvider
class.
See Also:
This constructor creates an instance of the OracleWebEventProvider
class.
// C# public OracleWebEventProvider();
This constructor creates a new instance of the OracleWebEventProvider
class.
See Also:
The OracleWebEventProvider
static methods are listed in Table 7-5.
Table 7-5 OracleWebEventProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
See Also:
The OracleWebEventProvider
public properties are listed in Table 7-6.
Table 7-6 OracleWebEventProvider Public Properties
Public Properties | Description |
---|---|
|
Inherited from |
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
|
Inherited from |
|
Inherited from |
|
Inherited from |
See Also:
This property gets the number of seconds that the command is allowed to execute before it is terminated with an exception.
// C# public int CommandTimeout {get;}
An int
.
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.
See Also:
The OracleWebEventProvider
public methods are listed in Table 7-7.
Table 7-7 OracleWebEventProvider Public Methods
Public Method | Description |
---|---|
Initializes the |
|
Processes the event passed to it as an argument |
|
Flushes the information passed to it as an argument |
|
Releases all resources |
|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
See Also:
This method initializes the OracleWebEventProvider
instance with the property values specified in the ASP.NET application configuration file (web.config
).
// C# public override void Initialize(string name, NameValueCollection config);
name
The name of the OracleWebEventProvider
instance to initialize.
config
A Systems.Collections.Specialized.NameValueCollection
object that contains the names and values of configuration options for the OracleWebEventProvider
.
InvalidOperationException
- If the OracleWebEventProvider
instance is already initialized.
ProviderException
- One of the following conditions exists:
The connectionStringName
attribute in the configuration file is null or empty.
The connection string corresponding to value of the connectionStringName
attribute is null or empty.
An unrecognized attribute is found in the configuration file.
Another error occurs during initialization of the provider.
The Initialize
method is not intended to be called directly by the application.
See Also:
This method processes the event passed to it as an argument.
// C#
public override void ProcessEvent(WebBaseEvent eventRaised);
eventRaised
The WebBaseEvent
object to be processed.
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.
See Also:
This method flushes the information passed to it as an argument.
// C#
public override void ProcessEventFlush(WebEventBufferFlushInfo flushEvent);
flushEvent
The WebEventBufferFlushInfo
object that contains a collection of buffered Web events.
This method is called by ASP.NET applications to flush all events into Oracle Database.
See Also:
This method releases all resources.
// C# public override void Shutdown();
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.