Index Changes
This is version 9. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Quality of Service (QoS)

The QoS library is a collection of classes that facilitate the implementation of systemic qualities in JBI components. Please review other tabs on this page for details about the utilities in this library. This library resides in the open-jbi-components project under ojc-core/component-common; its source can be browsed here: OJC CVS repository

Javadoc

The javadoc for QoS can be found on the OpenESB website.

Who uses QoS?

Service Engines

Binding Components

Wire Qualities

Redelivery & Throttling

Sun-built JBI components use the Quality of Service (QoS) library to implement redelivery and throttling. The library supports parsing of design-time artifacts as well as runtime implementation of retry attempts and throttling. For more information, visit the Redelivery and Throttling wiki pages.

Usage

Redelivery and throttling on the NMR is available via the MessagingChannel implementation that all components should use in place of JBI's DeliveryChannel. Protocol-specific redelivery and throttling for Binding Components is not available; see below.

Binding Components

The wire qualities provided by MessagingChannel are applicable only to exchanges with the NMR; therefore, protocol-specific redelivery and throttling are not available. While the design-time configuration provided by users is still available to Binding Components via the MessagingChannel's getServiceQuality method, the current design for systemic configuration links service qualities (i.e. redelivery, throttling) to the consumer endpoint of a connection, because only the consumer is guaranteed to be unique within the JBI environment. In Binding Components, a protocol-specific endpoint is always a provider in a connection, meaning service qualities cannot be linked to that endpoint.

ComponentConfig

Description

Models the definition and value(s) of properties defined in a component's JBI descriptor, using Sun's component Configuration extension. This utility can be used by a component, for example, to access and store configuration changes made at runtime via the admin console. One current use of this utility is in the AbstractConfigMBean utility.

Usage

Each component configuration is defined as a Property When fetching a configuration value, ComponentConfig will always return a non-null Property, even if a Property with the specified name doesn't exist. The value returned from that Property will be null.
    // copied from com.sun.jbi.common.qos.config.AbstractConfigMBean

    public AbstractConfigMBean(ComponentContext ctx, 
                               ComponentConfig config) throws DeploymentException {
        mLogger = Util.getLogger(ctx, RuntimeConfigurationMBean.class.getName());
        mWorkspaceRoot = ctx.getWorkspaceRoot();
        if (config == null) {
            mConfig = ComponentConfig.parse(ctx.getInstallRoot());
            //  will not fail if config.properties in workspace root doesn't exist
            ConfigPersistence.loadConfig(mConfig, mWorkspaceRoot);
        }
        else {
            mConfig = config;
        }
    }

    // a component's implementation of its runtime configuration MBean
    // would implement its getters/setters as follows (from com.sun.jbi.engine.xslt.XsltSEConfig):

    public class XsltSEConfig extends AbstractConfigMBean implements XsltSEConfigMBean {
    
        public XsltSEConfig(ComponentContext ctx, ComponentConfig config) 
                throws DeploymentException {
            super(ctx, config);
        }
    
        /** @see com.sun.jbi.component.config.PollerConfigMBean#getPollerCount() */
        public Integer getPollerCount() {
            return Integer.valueOf(getConfig().getProperty(POLLER_COUNT_PROPERTY).getValue());
        }
    
        /** @see com.sun.jbi.component.config.PollerConfigMBean#setPollerCount(java.lang.Integer) */
        public void setPollerCount(Integer count) {
            int val = (count == null) ? DEFAULT_POLLER_COUNT : count.intValue();
            getConfig().getProperty(POLLER_COUNT_PROPERTY).setValue(String.valueOf(val));
        }
    }

DeploymentLookup

Description

Provides lookup functionality against a component's deployed service assemblies. This utility is used by the MessagingChannel implementation to install endpoints' configured service qualities.

Usage

While most components will access service quality configuration via the MessagingChannel, some may require information about a deployed service unit's service assembly, for example:
    public String lookupServiceAssemblyName(ComponentContext ctx, String serviceUnitName) {
        DeploymentLookup lookup = new DeploymentLookup(ctx);
        ServiceAssembly sa = lookup.getServiceAssembly(serviceUnitName);
        return sa.getIdentification().getName();
    }

Constraint

The current implementation of DeploymentLookup only works in a JBI environment running in GlassFish.

MessagingChannel

Description

A decorator on the JBI DeliveryChannel capable of storing and implementing service qualities, including redelivery, throttling, and message tracking.

Usage

Every component implementing Sun's systemic qualities should use the default implementation, BaseMessagingChannel, in place of the default DeliveryChannel provided by a component's context.
    MessagingChannel channel = new BaseMessagingChannel(componentCtx);

Mailing List

For questions and comments, please subscribe to an appropriate list at OpenESB Mailing Lists.

Contacts

Number of visits: 3

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 12-Oct-08 10:00 AM, -0700 by KevanSimpson