View Full Version : creating a bean
Sep 22nd, 2004, 12:39 PM
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.
Sep 22nd, 2004, 01:34 PM
Using constructor-arg elements, as explained here:
Sep 22nd, 2004, 02:40 PM
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.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.