While bacterial prostatitis itself is not generally considered sexually transmitted, if the infection is caused by sexually transmitted bacteria, such as chlamydia or gonorrhea, it could potentially be passed to a sexual partner. In most cases, however, the bacteria responsible for prostatitis are not transmitted through sexual contact.