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

  • creating a bean

    Say you want to instantiate some DAO using a JNDIBeanFactory. You want to pass the DataSource from a SessionBean to the constructor of the DAO. How can you do this - I can't see how you specify constructor arguments at all when creating a bean.

    Please help

    Thanks

  • #2
    Using constructor-arg elements, as explained here:

    http://www.springframework.org/docs/...-collaborators

    Comment


    • #3
      Why would you want to pass the DataSource from the SessionBean? If the DataSource is bound in JNDI then you can inject it straight into your DAO using JndiObjectFactoryBean.

      Rob

      Comment

      Working...
      X