Index Changes

Difference between version and version     

Back to Qo S, or Qo S Info


At line 1 changed 2 lines.
!! QoS
This page provides information on systemic qualities libraries used by OpenESB components
%%tabbedSection
At line 4 changed 7 lines.
! Who uses QoS?
Most of Sun's JBI components, including:
|| Service Engines || Binding Components
| [BPELSE] | [HTTPBC.UserGuide]
| [XsltSE|XSLTSE] | [JMSBC]
| [IEPSE] | [FileBC]
| [ALESE] |
%%tab-Main
At line 12 changed 2 lines.
! Redelivery
Sun-built JBI components use the [Quality of Service (QoS)|https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/component-common/qos/] library to implement redelivery. The library supports parsing of design-time artifacts as well as runtime implementation of retry attempts. For more information, visit [the Redelivery home page|Redelivery].
!!! 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|https://open-jbi-components.dev.java.net/] under ojc-core/component-common; its source can be browsed here: [OJC CVS repository|https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/component-common/qos]
!! Javadoc
The javadoc for QoS can be found [on the OpenESB website|https://open-esb.dev.java.net/nonav/component-common/javadoc/index.html].
!! Who uses QoS?
! Service Engines
* [BPELSE]
* [XsltSE|XSLTSE]
* [IEPSE]
* [ALESE]
! Binding Components
* [HTTPBC|HTTPBC.UserGuide]
* [JMSBC]
* [FileBC]
%%
%%tab-WireQualities
!!! Wire Qualities
!! Redelivery & Throttling
Sun-built JBI components use the [Quality of Service (QoS)|https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/component-common/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|Redelivery] and [Throttling|BPELSEThrottling] 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|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/messaging/MessagingChannel.html#getServiceQuality(com.sun.jbi.common.descriptor.EndpointInfo,%20java.lang.Class)] 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.
%%
%%tab-ComponentConfig
!! ComponentConfig
! Description
Models the definition and value(s) of properties defined in a component's JBI descriptor, using Sun's [component Configuration extension|SystemicQualities.ConsolidatedConfiguration]. 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|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/config/AbstractConfigMBean.html] utility.
! Usage
Each component configuration is defined as a [Property|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/config/Property.html] When fetching a configuration value, [ComponentConfig|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/config/ComponentConfig.html] will always return a non-null <code>Property</code>, even if a <code>Property</code> with the specified name doesn't exist. The value returned from that <code>Property</code> will be <code>null</code>.
{{{
// 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));
}
}
}}}
%%
%%tab-ExtensionDescriptors
!!! Sun Extension Descriptors
Sun has designed extensions for both the service unit and service assembly descriptors. The utilities in the [com.sun.jbi.common.qos.descriptor package|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/descriptor/package-summary.html] are described below and on the next tab.
!! QoSServicesDescriptor
! Description
Parses and models a service unit or the list of endpoint entries in a service unit descriptor.
! Sun Extension
Provides access to <code>ApplicationConfiguration</code> keyed by [EndpointInfo|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/descriptor/Endpointinfo.html].
! Usage
{{{
public Map<EndpointInfo, String> lookupApplicationConfiguration(String serviceUnitRootPath) {
QoSServices srvcs = QoSServicesDescriptor.parse(serviceUnitRootPath);
return srvcs.getApplicationConfigurations();
}
}}}
!! QosAssemblyDescriptor
! Description
Parses and models the connections and service units in a service assembly descriptor.
! Sun Extension
Provides access to service quality configurations keyed by consuming [EndpointInfo|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/descriptor/Endpointinfo.html].
! Usage
{{{
public Map<EndpointInfo, List<ServiceQuality>> lookupServiceQualities(File serviceAssemblyDescriptor) {
QosConfig cfg = QosAssemblyDescriptor.parse(new InputSource(new FileReader(serviceAssemblyDescriptor)));
return cfg.getServiceQualities();
}
}}}
%%
%%tab-DeploymentLookup
!! DeploymentLookup
! Description
Provides lookup functionality against a component's deployed service assemblies. This utility is used by the [MessagingChannel|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/messaging/MessagingChannel.html] implementation to install endpoints' configured service qualities.
! Usage
While most components will access service quality configuration via the <code>MessagingChannel</code>, 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|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/descriptor/DeploymentLookup.html] only works in a JBI environment running in [GlassFish|https://glassfish.dev.java.net/downloads/v2ur2-b04.html].
%%
%%tab-MessagingChannel
!! MessagingChannel
! Description
A decorator on the JBI <code>DeliveryChannel</code> 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|https://open-esb.dev.java.net/component-common/docs/api/com/sun/jbi/common/qos/messaging/BaseMessagingChannel.html], in place of the default <code>DeliveryChannel</code> provided by a component's context.
{{{
MessagingChannel channel = new BaseMessagingChannel(componentCtx);
}}}
!! Exchange Filter
! Description
A primitive interceptor to process message exchanges sent to and accepted from the NMR. The systemic qualities [redelivery|Redelivery], [throttling|BPELSEThrottling], and [message tracking|IAD] are implemented using this API.
! Usage
{{{
// It is recommended that ExchangeFilter implementations extend com.sun.jbi.common.qos.messaging.filter.AbstractExchangeFilter
/** @see com.sun.jbi.common.qos.messaging.filter.AbstractExchangeFilter#processIncomingExchange(javax.jbi.messaging.MessageExchange, java.lang.Object[]) */
public MessageExchange processIncomingExchange(MessageExchange msg, Object... params)
throws MessagingException {
// TODO: process exchanges accepted from the NMR
}
/** @see com.sun.jbi.common.qos.messaging.filter.AbstractExchangeFilter#processOutgoingExchange(javax.jbi.messaging.MessageExchange, java.lang.Object[]) */
public MessageExchange processOutgoingExchange(MessageExchange msg, Object... params)
throws MessagingException {
// TODO: process exchanges sent to the NMR
}
}
}}}
! Adding ExchangeFilter to MessagingChannel
{{{
// NOTE: ExchangeFilters are applied in the order specified to the BaseMessagingChannel constructor
MessagingChannel channel = new BaseMessagingChannel(componentCtx,
new ThrottlingFilter(this),
RedeliveryFilter.createRedeliveryFilter(this));
}}}
%%
%%tab-ContactUs
! Mailing List
For questions and comments, please subscribe to an appropriate list at [OpenESB Mailing Lists|https://open-esb.dev.java.net/servlets/ProjectMailingListList].
! Contacts
* Developer: [Kevan.Simpson@Sun.COM|mailto:Kevan.Simpson@Sun.COM]
%%
%%
__Number of visits:__ [{org.goodjava.plugin.hitcounter.HitCounter}]
! Related Links
* [All OpenESB JBI Components|https://open-esb.dev.java.net/Components.html]

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-12) was last changed on 13-Oct-08 10:02 AM, -0700 by KevanSimpson