Results 1 to 2 of 2

Thread: MDB and BeanFactory

  1. #1
    Join Date
    Apr 2005
    Posts
    5

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default Re: MDB and BeanFactory

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

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

    Quote 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •