Forum Stats

  • 3,840,319 Users
  • 2,262,585 Discussions


Cache cannot be accessed from EventBean in separated bundle? CEP Bug?

Hysun He-Oracle
Hysun He-Oracle Member Posts: 32 Employee
edited Apr 26, 2013 10:39PM in Complex Event Processing
Hi Gurus,

I am using ocep_11.1 and Coherence_3.7.1 for a telcom project(POC). I have 2 separated bundles, and they both need to operate a same coherence Cache. Considering cache service is global, i have created 3rd bundle to hold this cache for share purpose. When i am trying to access the cache (in shared bundle) from my eventbean in separated bundle, exception throws. Details as follows:

In my shared bundle EPN (Say bundle name is HelloShareBundle), the declaration of the shared cache is:
<wlevs:cache id="dataCache" key-properties="id1" value-type="MyEvent" advertise="true" >
<wlevs:caching-system ref="testSys" />

In my app bundle EPN, the declaration of the eventbean which need to refer to the shared "dataCache" is:
<wlevs:event-bean id="eventBean1" class="cache.CacheClientReceiver">
<wlevs:instance-property name="cache" ref="HelloShareBundle:dataCache" />
<wlevs:listener ref="helloworldInputChannel" />

I then firstly deployed the shared bundle successfully. But when deploy the app bundle with the EPN as above, exception throws:

Caused By: org.springframework.beans.FatalBeanException: Unable to set instance-property reference for bean eventBean1, property cache, exception was org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'HelloShareBundle:dataCache' is defined
at com.bea.wlevs.spring.StageFactoryBean.injectInstancePropertyValues(
at com.bea.wlevs.spring.StageFactoryBean.createInstance(
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(
at com.bea.wlevs.spring.BaseFactoryBean.afterPropertiesSet(
at com.bea.wlevs.spring.StageFactoryBean.afterPropertiesSet(

But if i use <cache-source ref="HelloShareBundle:dataCache" /> in a processor (with the only purpose of verifying the dataCache can be reference in this EPN), the bundle can be deployed successfully.

Does this mean wlevs:instance-property in CEP can not support reference to a external bean defined in a shared bundle?

Thanks in advance
- Hysun

Edited by: Hysun on 2013-4-25 下午9:19

Edited by: Hysun on 2013-4-26 下午7:25

Edited by: Hysun on 2013-4-26 下午7:33

Edited by: Hysun on 2013-4-26 下午7:34

Edited by: Hysun on 2013-4-26 下午7:39
This discussion has been closed.