Epoxy glue is often used. This is a 2-pack adhesive you mix up then apply to the connector sockets. Araldite is one brand.
You can also 'pot' the boards with it in cases where there is a risk of liquid entry - as there will be in an
ecig mod. Potting means to encapsulate a circuit board in a material that sets up solid and stops any liquid getting to the electronics. There are special quick-set compounds that are better for this, as when you get epoxy on stuff it's there for life, and it has a habit of getting everywhere - it's permanent.