EJB 면접 질문과 답변
Question: What is lazy loading?Answer: Lazy loading means not creating an object until the first time it is accessed. Lazy loading typically looks like this:public class Example { private Vector data = null; public Vector getData() { if (this.data == null) { this.data = new Vector(); // Load data into vector } return this.data; } } This technique is most useful when you have large hierarchies of objects (such as a product catalog). You can lazy-load subordinate objects as you navigate down the hierarchy, and thereby only create objects when you need them. |
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
도움이 되었나요? 예 아니요
Most helpful rated by users:
- What are the different kinds of enterprise beans?
- What is Entity Bean?
- What is Session Bean?
- What is the difference between Container-Managed Persistent (CMP) bean and Bean-Managed Persistent(BMP)?
- What are the methods of Entity Bean?