Announcement Announcement Module
Collapse
No announcement yet.
MDB and BeanFactory Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MDB and BeanFactory

    Hi,

    I've an MDB extending org.springframework.ejb.support.AbstractJmsMessage DrivenBean.
    Inside this MDB i would like to access a StatelessSessionBean by retrieving it from the bean factory.

    How could do this? Do i need to add the MDB to the BeanFactory?

    Looking at the other StatelessSessionBean that we've used, there bean factory is set after deployment. When/where does the BeanFactory attribute actually get set? How do i do this for the MDB?

    Thanks much.

  • #2
    Re: MDB and BeanFactory

    Originally posted by vichandoko
    How could do this?
    Just as accessing the SLSB from anywhere else. See here for details.

    Originally posted by vichandoko
    Do i need to add the MDB to the BeanFactory?
    No, you don't.

    Originally posted by vichandoko
    Looking at the other StatelessSessionBean that we've used, there bean factory is set after deployment. When/where does the BeanFactory attribute actually get set? How do i do this for the MDB?
    It happens in your base class AbstractJmsMessageDrivenBean (or, more exactly, a superclass thereof). If you are interested in details, have a look at the javadoc or the source code of this class.

    Regards,
    Andreas

    Comment

    Working...
    X