Top "Lazy-initialization" questions

Lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.

Getting "could not initialize proxy - no Session" despite the fact I'm using a @Transactional annotation

I'm using Spring 3.1.1.RELEASE and Hibernate 4.1.0.Final. I'm getting a "could not initialize proxy - no Session" exception, despite the …

spring hibernate transactions lazy-initialization
Thread safe lazy construction of a singleton in C++

Is there a way to implement a singleton object in C++ that is: Lazily constructed in a thread safe manner (…

c++ multithreading singleton construction lazy-initialization
Lazy instantiation in Objective-C/ iPhone development

Quick question... Well I understand that all properties start out as nil in Objective-C and that sending a message to …

objective-c properties initialization lazy-initialization alloc
Lazy Var vs Let

I want to use Lazy initialization for some of my properties in Swift. My current code looks like this: lazy …

swift var lazy-initialization let
What does Hibernate.initialize do?

What does Hibernate.initialize do? Usually referred documentation talk only about Hibernate.initialize(entity.lazyCollection) Is there any sense in …

hibernate lazy-initialization
Python class member lazy initialization

I would like to know what is the python way of initializing a class member but only when accessing it, …

python lazy-evaluation lazy-initialization
lazy function definitions in scala

I've been learning scala and I gotta say that it's a really cool language. I especially like its pattern matching …

scala design-patterns lazy-loading lazy-evaluation lazy-initialization
Lazy collection initialization fails in hibernate

Today I faced with next problem in hibernate: My method: @Transactional public Period getDefault(Team team) { Period defaultPeriod = team.getDefaultPeriod(); …

java hibernate collections lazy-initialization
failed to lazily initialize a collection of role: com.pojo.Student.phonenos, no session or session was closed

I am learning hibernate mapping using annotation. I have completed one section. I.e. I can insert child class automatically …

hibernate annotations lazy-loading one-to-many lazy-initialization
Lazy Injection with Dagger 2 on Android

I’m new to Dagger 2. I have this scenario, I wan't to inject an object across my app (in presenters, …

android dependency-injection lazy-initialization dagger-2