Another requirement is that one of the surfaces has pores or roughness - this will allow the glue to absorb well and have a clutch.
Next, insert a spray can with glue into a special gun.