Forum Stats

  • 3,851,779 Users
  • 2,264,024 Discussions
  • 7,904,848 Comments

Discussions

When to use Custom Adapter, Event Beans and Spring beans

900697
900697 Member Posts: 50
edited Mar 7, 2012 10:44PM in Complex Event Processing
Hi,

I have basic question on when or on what basis/scenario the Custom Adapter, Event Beans or Spring beans should be used.

All three has same implementation methods.

Please help me in understanding when to use Custom Adapters, Event Beans or Spring beans.


Thanks,
Sri

Edited by: 897694 on Mar 7, 2012 8:12 AM
Tagged:

Answers

  • 877753
    877753 Member Posts: 25
    edited Mar 7, 2012 10:44PM
    custom adapters:
    you have to use a custom adapter when you don't find any adapter in ocep which will serve your purpose.
    Most of the times you use an adapter to connect the application with external things like http server, etc It can be both to listen the events or to send the events outside.

    Event Beans:
    This type of beans does most of the work that an adapter code does but in convention beans are not used to connect the application with external stuff
    You can use Beans as event sink etc In this case using an using an adapter is not suggestable.
    If you implement Interfaces like Initializing Bean for an adapter code it won't work properly, you have to use an event Bean in that case.

    Spring beans:
    Spring beans are used when the bean code doesn't implement EventSink or EventSender.
    These beans are used to enable something (eg: make ${wlevs_dev_home}/abc/a/b.java this path is not understandable by java code unless you override the path using a spring bean)
    Most of the things which doesn't need a connection between components in the application (eg cache loader: you can do this using spring beans and event beans both but spring beans doesn't need a connection with cache)

    Hope this small writeup helps you :)

    Edited by: Patha on Mar 8, 2012 9:10 AM
This discussion has been closed.