You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2011/09/30 11:26:30 UTC

OSGi event topic with dots silently ignored, is that by design?

Hi,

If I call JobUtil.processJob(new Event("foo.bar.wii.yes")..) nothing
happens, and using foo/bar/wii/yes for the topic works.

Is that by design, and shouldn't there be a warning somewhere if
topics are ignored or transformed?

-Bertrand

Re: OSGi event topic with dots silently ignored, is that by design?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

This is by specification of the OSGi EventAdmin service (where the Event
class is defined):

   topic ::= token ( ’/’ token ) * // See 1.3.2 Core book
   digit ::= [0..9]
   alpha ::= [a..zA..Z]
   alphanum ::= alpha | digit
   token ::= ( alphanum | ’_’ | ’-’ )+

Thus a topic with a dot is illegal.

Regards
Felix


On 30.09.2011 11:26, Bertrand Delacretaz wrote:
> Hi,
>
> If I call JobUtil.processJob(new Event("foo.bar.wii.yes")..) nothing
> happens, and using foo/bar/wii/yes for the topic works.
>
> Is that by design, and shouldn't there be a warning somewhere if
> topics are ignored or transformed?
>
> -Bertrand