Results 1 to 3 of 3

Thread: creating a bean

  1. #1
    Join Date
    Sep 2004
    Posts
    5

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

    Default

    Using constructor-arg elements, as explained here:

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

  3. #3
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

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