Announcement Announcement Module
Collapse
No announcement yet.
getting the bean given a class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting the bean given a class

    Is it possible to get the bean by a class

    I have a bean

    <bean id="pseudoDemandStatusJobListener" class="com.uprr.app.csr.job.CustomJobListener"/>


    is it possible to retrieve bean pseudoDemandStatusJobListener by passing tha class com.uprr.app.csr.job.CustomJobListener ?
    The reason is

    My table

    type classname
    tcm com............xyz.class
    tcs com............abd.class

    I get this type from user and I want to call proper handler to handle the job.

    All my objects are spring configured so when I get this class name I want to find the spring bean .

  • #2
    Consider calling getBeansOfType() method on your application context object

    Comment

    Working...
    X