You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Cobarzan Laura <cl...@yahoo.com> on 2010/01/18 15:30:01 UTC

Esper on OSGI

Hi all,

I am working on a small prototype of event processing with Esper. To model events I am using the Event class from the EventAdmin bundle. 
My problem is that I don't know how to retrieve the attributes of an event in a statement. For example I have an event with the topic MarketData with the properties (product, price, volume)
and I would like to retrieve only the events with the attribute product="p1".
Something like the following:

select * from MarketData.win:time(10 sec) where topic="MarketData" and product="p1"

But this statement troughs an error "Error validating expression: Property named 'price' is not valid in any stream", so I guess this is not the right way...

Did any of you had experience with Esper on OSGI?

I would appreciate your help,
Laura



      

RE: Esper on OSGI

Posted by Gursel Taskale <gt...@liquidnet.com>.
Haven't tested it yet, but this looks like what you are looking for:
http://www.dynamicjava.org/articles/osgi-integration/esper-osgi

See the section on Integration Issues.

/GT

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Tuesday, January 19, 2010 9:50 AM
To: users@felix.apache.org
Subject: Re: Esper on OSGI

On 1/19/10 7:41, Jochen Mader wrote:
> It could be a class visibility problem.
> I guess esper is a separate bundle and you are configuring esper in your own
> bundle.
> If your own bundle has a dependency on the esper bundle it the esper bundle
> won't be able to see classes from your own bundle.
> Add "Bundle-BuddyPolicy: dependent" to the manifest of the esper bundle.
> This will allow the esper bundle to see the contents of bundles that depend
> on it.
>    

FYI: That won't help if you are using the Felix framework, since it is a 
non-standard feature of Equinox.

-> richard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Esper on OSGI

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/19/10 7:41, Jochen Mader wrote:
> It could be a class visibility problem.
> I guess esper is a separate bundle and you are configuring esper in your own
> bundle.
> If your own bundle has a dependency on the esper bundle it the esper bundle
> won't be able to see classes from your own bundle.
> Add "Bundle-BuddyPolicy: dependent" to the manifest of the esper bundle.
> This will allow the esper bundle to see the contents of bundles that depend
> on it.
>    

FYI: That won't help if you are using the Felix framework, since it is a 
non-standard feature of Equinox.

-> richard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Esper on OSGI

Posted by Jochen Mader <pf...@gmail.com>.
It could be a class visibility problem.
I guess esper is a separate bundle and you are configuring esper in your own
bundle.
If your own bundle has a dependency on the esper bundle it the esper bundle
won't be able to see classes from your own bundle.
Add "Bundle-BuddyPolicy: dependent" to the manifest of the esper bundle.
This will allow the esper bundle to see the contents of bundles that depend
on it.

Re: Esper on OSGI

Posted by Cobarzan Laura <cl...@yahoo.com>.
Hi,

I don't think I am in the wrong mailinglist...
I have my prototype working with plain Esper, but I have problems in porting it into OSGI (using Felix).

I apologize for the error with the "price" property; I have tested with all event properties and copied the last tested, but I get the same error also with the "product" property.

"Error validating expression: Property named 'product' is not valid in any stream"

I have the event MarketData registered to Esper runtime, but it is registered with the Event class from the EventAdmin bundle (I don't have my own MarketData class, I use the same Event class, but with different properties).

configuration.addEventType("MarketData", Event.class);

I choose this solution due to the facilities offered by EventAdmin bundle.

Thank you,
Laura

--- On Tue, 1/19/10, Jochen Mader <pf...@gmail.com> wrote:

From: Jochen Mader <pf...@gmail.com>
Subject: Re: Esper on OSGI
To: users@felix.apache.org
Date: Tuesday, January 19, 2010, 12:03 PM

I did and I don't think you are in the right mailinglist.
Esper is apparently working and you are running into esper related problems.

CU

Jochen

P.S.: You are also lacking a lot of detail to answer your question, your
query doesn't even contain price.
Are you sure you actually registered the event-class of MarketData to the
Esper runtime?



      

Re: Esper on OSGI

Posted by Jochen Mader <pf...@gmail.com>.
I did and I don't think you are in the right mailinglist.
Esper is apparently working and you are running into esper related problems.

CU

Jochen

P.S.: You are also lacking a lot of detail to answer your question, your
query doesn't even contain price.
Are you sure you actually registered the event-class of MarketData to the
Esper runtime?