  We investigate the effect of dissipation in a Bose-Josephson junction (BJJ)
coupled to bath of bosons at two sites. Apart from the dynamical transition due
to repulsive interactions, the BJJ undergoes a quantum phase transition by
increasing the coupling strength with the bath modes. We analyze this system by
mapping to an equivalent spin model coupled to the bosonic modes. The
excitation energies and fluctuation of number imbalance are obtained within
Holstein-Primakoff approximation, which exhibit vanishing of energy gap and
enhanced quantum fluctuations at the critical coupling. We study the dynamics
of BJJ using time dependent variational method and analyze stability of
different types of steady states. As a special case we study in details the
phase space dynamics of BJJ coupled to a single mode, which reveals diffusive
and incoherent behaviour with increasing coupling to the bath mode. The
dynamical steady states corresponding to the Pi-oscillation and self-trapped
state become unstable in the region where their oscillation frequencies are in
resonance with the bath modes. We investigate the time evolution of number
imbalance and relative phase in presence of Ohmic bath with Gaussian noise to
incorporate thermal fluctuations. Apart from damping of Josephson oscillations
and transition to symmetry broken state for strong coupling we observe decay of
Pi-oscillation and self-trapped state to the ground state as a result of
dissipation. Variation of phase fluctuation with temperature of the bath shows
similar behaviour as observed in experiment. Finally we discuss the
experimental setup to study the observable effects of dissipation in BJJ.
