We study the Bose–Einstein condensates in optical lattice. System is arranged as a bosonic random Josephson junction array in wood-pile geometry. We solve the model Hamiltonian to obtain the critical temperature of the glass transition. We calculate the critical temperature of the phase-locking transition.