Managing OSB service lifecycles

The lifecycle of OSB services is rather different from that of SOA composites. Naturally, managing them is also considerably different. At a high level, an OSB service typically consists of one or more proxy services, one or more business services, and pipelines. The proxy service is the interface of the OSB pipeline that contains the service orchestration logic, whereas a business service is merely a façade of your external services. Think of a proxy service as the input to your OSB service. This could be a simple WSDL interface that is called as a web service on demand or it could be a polling service, wherein the proxy service, for example, polls a particular table or queue to receive its input.

On the other hand, a business service is simply a wrapper to the target services, such as a database table, JMS queue, flat file, or another web service, that the OSB components of your projects may call.

Unlike SOA composites, OSB services can be completely manipulated through the console, including updating any business logic, mappings, or flows! In fact, all development can be exclusively done via the Oracle Service Bus Console, and technically, there is no need to develop OSB projects in Oracle JDeveloper 12c if you choose not to.

In this section, we describe various settings that can be manipulated at runtime to allow you, the administrator, to manage various OSB service lifecycles.

Managing OSB service operations

All OSB runtime operational settings are manipulated through Fusion Middleware Control (accessible at /em), not the Service Bus Console (accessible at /servicebus or /sbconsole), which is purely dedicated to design-time configuration.

On the navigator in Fusion Middleware Control, expanding SOA and then service-bus reveals a list of all your deployed OSB services (refer to Figure 4.12). Here, you can either navigate to the operational settings of an individual service or view the operational settings for all services. For example:

  • Right-clicking on service-bus then navigating to Home | Operations displays the operational settings of all deployed services
  • Right-clicking on a particular service in the navigator, for instance, CustomerReq, then navigating to Home | Operations displays the operational settings for that individual service only:
    Managing OSB service operations

    Figure 4.12: All OSB services are listed under service-bus in the navigator

Operational settings let you update configurations such as monitoring, alerts, reporting, logging, message tracing, and business service result caching at runtime. You can specify operational settings for all services, at the service and global levels, and use the global settings to turn on and off monitoring, SLA alerts, pipeline message reporting, and pipeline message logging.

The following screenshot displays all runtime operational settings deployed to our OSB server. If a checkbox is unchecked, for example, it is highlighted in yellow, as shown in the following screenshot, after which you must click on the Apply button to commit the change:

Managing OSB service operations

Figure 4.13: Viewing operational settings for all OSB services

The changes take effect immediately. Not all settings are applicable to all OSB component types. For example, Caching is only applicable to business services while Reports are only relevant to pipelines. Each of the operational settings shown in Figure 4.13, also described in more detail in Chapter 6, Monitoring Oracle SOA Suite 12c, provide us with further details on the settings that are related to monitoring.

State

Disabling an OSB proxy service essentially stops the OSB service from accepting an input. If the OSB proxy service is a web service, calls to the service will fail with an HTTP 404 error similar to the following:

10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.</p><p>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

If the OSB proxy service is a polling service, then polling is suspended. The reverse is true when enabling a proxy service.

Note

A single OSB project may contain multiple proxy services, so each proxy service must be enabled or disabled separately.

Manipulating the state of a proxy service is the equivalent of turning on or off the service. Similarly, State is applicable to business services.

Monitoring

The Monitoring operational setting enables or disables service monitoring. Certain operational settings, such as Logging and Alerts, rely on monitoring being enabled for them to function. Monitoring is disabled by default for all services.

Aggregation Interval

The Aggregation Interval operational setting defines the aggregation interval for the service. Statistical data for the OSB component is collected and aggregated over the time period selected here. The default interval is 10 minutes.

SLA Alerts

During design time, the developer may have set up Service-level Agreement (SLA) Alerts. SLA Alerts can be viewed in Fusion Middleware Control under the Alert History tab, as shown in the following screenshot:

SLA Alerts

Figure 4.14: Viewing SLA alerts

The SLA Alerts operational setting simply enables or disables this function. SLA Alerting is enabled by default for all services.

Message Tracing

Message Tracing is a feature in OSB that enables us to log pipeline actions in the server log at various levels. It allows administrators to troubleshoot and diagnose a message flow in one or more proxy services. Like other operational settings, Message Tracing can be enabled or disabled. During design time, a developer may choose to configure Message Tracing, as shown in the following screenshot:

Message Tracing

Figure 4.15: Configuring Message Tracing through the Oracle Service Bus Console

This configuration is performed either through JDeveloper or the Service Bus Console. The enablement and disablement of Message Tracing is done through Fusion Middleware Control. Message Tracing is disabled by default.

Pipeline Alerts

The Pipeline Alerts operational setting allows the administrator to enable or disable alerting for pipelines at a specific severity level (or higher). Pipeline alerts are enabled at the normal level or higher by default.

Logging

The Logging operational setting enables or disables logging at a specific severity level for pipelines and split-joins. For example, when logging is enabled and the message tracing detail level is set to Full (as in Figure 4.15), full logging details can be observed in the osb_server1-diagnostic.log log file. This can include request and response payloads and everything in between, as shown in the following code:

[2015-02-01T09:34:16.598-05:00] [wls_osb1] [NOTIFICATION] [OSB-398200] [oracle.osb.resources.service.service] [tid: [ACTIVE].ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b136da4e-2d94-4b59-98d5-5291c201bb2b-000592c9,0] [APP: Service Bus Kernel] [FlowId: 0000Kh5^42J6ATMS6MGNsy1Kl6jH00000D] [[
 [OSB Tracing] Inbound request was received.

 Service Ref = HelloWorldOSB/HelloWorldPS
 URI = /HelloWorldOSB
 Message ID = 47b2cdd7.7e483a17.c.14b422bd014.N7fff
 Request metadata =
    <xml-fragment>
      <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <http:Accept-Encoding>gzip,deflate</http:Accept-Encoding>
        <http:Connection>Keep-Alive</http:Connection>
        <http:Content-Length>252</http:Content-Length>
        <http:Content-Type>text/xml;charset=UTF-8</http:Content-Type>
        <http:Host>osb.packt.com:8011</http:Host>
        <http:SOAPAction>""</http:SOAPAction>
        <http:User-Agent>Apache-HttpClient/4.1.1 (java 1.5)</http:User-Agent>
      </tran:headers>
      <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">UTF-8</tran:encoding>
      <http:client-host xmlns:http="http://www.bea.com/wli/sb/transports/http">static-71-178-205-210.washdc.fios.verizon.net</http:client-host>
      <http:client-address xmlns:http="http://www.bea.com/wli/sb/transports/http">71.178.205.210</http:client-address>
      <http:http-method xmlns:http="http://www.bea.com/wli/sb/transports/http">POST</http:http-method>
    </xml-fragment>
 Payload =
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wss="http://raastech.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <wss:hello>
         <arg0>Jack</arg0>
      </wss:hello>
   </soapenv:Body>
</soapenv:Envelope>

]]
[2015-02-01T09:34:16.663-05:00] [wls_osb1] [NOTIFICATION] [OSB-398201] [oracle.osb.resources.service.service] [tid: [ACTIVE].ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b136da4e-2d94-4b59-98d5-5291c201bb2b-000592c9,0:1] [APP: Service Bus Kernel] [FlowId: 0000Kh5^42J6ATMS6MGNsy1Kl6jH00000D] [[
 [OSB Tracing] Inbound response was sent.

 Service Ref = HelloWorldOSB/HelloWorldPS
 URI = /HelloWorldOSB
 Message ID = <47b2cdd7.7e483a17.c.14b422bd014.N7fff>
 Response metadata =
<xml-fragment>
  <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
  </tran:headers>
  <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>
  <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
</xml-fragment>
 Payload =
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wss="http://raastech.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <wss:hello>
         <arg0>Hello Jack</arg0>
      </wss:hello>
   </soapenv:Body>
</soapenv:Envelope>

]]

Logging is extremely beneficial to troubleshoot issues. Generally speaking, enabling full logging is discouraged in a production environment that is running without any issues.

Reports

Report actions are valuable as they allow specific elements to be captured and displayed through the Oracle Service Bus Console. For example, you may have an order transaction that consists of hundreds of elements in the payload. But for the purposes of monitoring, you simply wish to capture the order number in order to identify its OSB instance. The following screenshot shows an example where we are capturing an order number from the input payload as a Report action:

Reports

Figure 4-16. Searching through captured Report actions

In Fusion Middleware Control, simply navigate to SOA | service-bus | Message Reports, where a list of all Report actions are displayed. In the preceding screenshot, we can also see numerous order numbers. In this example, administrators can search by a Report Index type to locate a specific order number. From there, clicking on Report Index unveils additional details surrounding this OSB instance.

The Report operational setting simply enables or disables message reporting for pipelines.

Note

There is considerable overhead for Report actions for the mere fact that the OSB service is no longer stateless, as this data must be persisted.

Therefore, Report actions may not be ideal for extremely high-volume transactions. The Report operational setting is enabled by default.

Execution Tracing

The Execution Tracing operational setting is also used to enable or disable execution tracing for pipelines and split-joins. Execution tracing is disabled by default, but when enabled, gives the administrator the ability to troubleshoot a message flow. Information, such as a stage name, pipeline or route node name, and the current message context, is captured.

Caching

Caching is only applicable for business services. The Caching operational setting simply enables or disables result caching for a business service at runtime. OSB uses coherence in the backend as its cache.

It is generally recommended that you use caching for data that is not frequently updated. For example, if you are an online retailer, the description of your product being sold rarely changes, and lookups to product descriptions may benefit from the 15% to 25% performance gain achieved by leveraging caching. The normal behavior of the caching feature is that it does not require re-invoking the backend until the data in the cache expires.

Advanced debugging in OSB

Oracle Service Bus also allows advanced debugging by letting you enable and disable debug flags for various modules. These flags are present in either alsbdebug.xml (component-related debug flags) or configwkdebug.xml (configuration-related debug flags). These files are located in the root directory of the domain where OSB is configured. By default, all component and configuration debug flags are set to false. The following XML markup provides a snippet of alsbdebug.xml with debugging turned on for the throttling and caching modules:

<java:sb-debug-logger xmlns:java='java:com.bea.wli.debug'>
  <java:alsb-throttling-debug>true</java:alsb-throttling-debug>
  <java:alsb-result-caching-debug>true</java:alsb-result-caching-debug>
</java:sb-debug-logger>

Changes to debug log configuration files require a server restart to take effect.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.173.238