Forum Stats

  • 3,840,319 Users
  • 2,262,585 Discussions
  • 7,901,216 Comments

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" />
</wlevs:cache>

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" />
</wlevs:event-bean>

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(StageFactoryBean.java:297)
at com.bea.wlevs.spring.StageFactoryBean.createInstance(StageFactoryBean.java:155)
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:130)
at com.bea.wlevs.spring.BaseFactoryBean.afterPropertiesSet(BaseFactoryBean.java:195)
at com.bea.wlevs.spring.StageFactoryBean.afterPropertiesSet(StageFactoryBean.java:101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

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.