hibernate多选的一些疑问

时间:2014-12-24 20:30:07

标签: hibernate

需要专家帮助才能清除我的考试。请帮忙。如果您是专家,请提供这些问题的答案。 :)提前致谢

Q1)If you are trying session scope with regular spring IoC container such as XmlBeanFactory or ClassPathXmlApplication context which exception you will get ?
a)classcast Exception
b)Illegal Exception
c)BeanCreationException
d)Bean Exception

Q2)we configure a bean from ___________class in spring bean documents to get ‘session factory’ of ‘Hibernate’
a)session factory
b)Session Bean factory 
c)local session bean factory
d)session bean


Q3)In Spring , where will you define the bean factories ?
a)BeanRefContext.xml
b)businessApplicationContext.xml
c)spring.xml
d)application.xml


Q4)which attribute in <bean> tag instructs  the container to instantiate the bean only when getBean(“beanid”) is invoked ?
a)abstract
b)lazy-init
c)scope
d)init-method

1 个答案:

答案 0 :(得分:0)

  1. (我没有理解你的要求)。可能是bean创建异常
  2. 本地会话工厂bean(C)
  3. businessApplicationContext.xml(B)
  4. lazy-init(b)