Hi,

What is the proper way of using iBatis with EJB?  Currently, I have the 
following in my stateless session bean ejbCreate():

            Reader reader = Resources.getResourceAsReader("dao.xml");
            this.daoManager = DaoManagerBuilder.buildDaoManager(reader);

Then any methods in the session bean that needs to get the DAO will need to do 
the following:

            ReportDAO reportDao = (ReportDAO) 
daoManager.getDao(ReportDAO.class);

Is the above method correct?  Or should a singleton be used to create the 
daoManager and to retrieve the DAO?  I'm worried about thread-safety for 
singleton with EJB.

Thanks for your comment!



Regards,

Jim


      Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com
http://mail.promotions.yahoo.com/newdomains/sg/

Reply via email to