Previous Topic

Next Topic

Book Contents

Book Index

Configuration Properties

The OSGi Event Admin Bundle owns a set of user-definable configuration properties, described in the table below.

If you want to be able to configure the Event Admin service through the Configuration Admin you need to have the mbs.eventadmin.registerManagedService system property set to true before starting the Event Admin bundle. In this case the Event Admin bundle registers an org.osgi.service.cm.ManagedServiceFactory with FPID mbs.eventadmin.factory.pid, which allows you to create multiple different configurations from this Managed Service Factory. If the value of the isMain configuration property is false, for every such configuration the bundle registers an instance of the Event Admin Service with the respective configuration properties. In this way you can have different Event Admin Services configured as you need. If the value of the isMain configuration property is true, there is only one instance of the Event Admin Service with the last created configuration.

Configuration Property

Name

Type

Default Value

Description

isMain

IsMain

boolean

false

Required. If true, there is only one configuration of the Event Admin service. If false, there are multiple instances of the Event Admin service.

maxQueues

Max Pool Queues

int

50

Required. The quantity constraints for queues in the pool.

maxWorkers

Max Pool Workers

int

50

Required. The quantity constraints for workers in the pool.

useBlackList

Use Black List

boolean

true

Required. If true, the Event Admin uses a black list for the halted Service References. If an Event Handler hangs while processing an event, it is put in a black list and the Event Admin checks periodically its state. If after a certain period the Event Handler does not return, no more events are processed to this handler.

srvProps

Service Properties

String[]

-

Optional. Service properties that are added when custom Event Admin services are registered in the framework. They are presented in the form of "name=value" pairs. When defining a new instance of the Event Admin service, you must enter the service properties in this field.