I had a similiar experience with my bout of prostatitis this winter. It occurred during the holidays and I could not get in to see a urologist so I went to the Urgent Care Center. Being a young male in my mid 20's, the doctor assumed that I had an STD (he didn't know what else it could be). He asked me a series of questions all of which I answered no. Are you sexually active? Have you engaged in sex in the last 10 days? Do you have discharge? etc. etc. I told him that it didn't burn when I pee'd but it hurt at the tip of my penis (classic prostatits symptom). He concluded that maybe it was E. Coli or some other bacteria and prescribed Zithromax (6 days) and Doxycyline (10 day). He said, "whatever it is, that'll clear it up".
I started taking the antibiotics and after a few days, I started to feel better but then I got worse. I went to a urologist and he quickly diagnosed me with prostatitis. He told me to finish the 10 day Doxy and then he switched me to Levaquin (which I reacted to) so he extended my Doxy prescription 21 more days. While taking the medicine for the 30 days I felt much better, then worse, then better, then worse but never as bad as the previous worse. I was really scared that it was happening all over again. Then the urologist told me that I would feel symptoms for the next 6 months before it fully (hopefully) cleared.
Here is what you need to know. The prostate is very thick and it's difficult for antibiotics to penetrate. You need to be on a heavy dose of antibiotics for some time but it's best if your doctor can identify the bacteria which is often very hard. You're symptoms will last for some time. As far as STD's are concerned, bacteria STD's like Gonorrhea and Chlamydia can cause prostatitis but many other things can cause it as well. For example, the colon contains bacteria that will cause infections if they get to the urethra. It is believed that bacteria can pass from the colon to the prostate from hard impacts and occupations with a lot of vibration (bus drivers, truck drivers, motorcycles, etc) Urine that backs up into the prostate can also cause prostatitis.
I would recommend finding a urologists who specializes in prostatitis and meeting with him about these conditions. Cranberry juice or pills is also very good at preventing infections from happening.
Here is a good overview from the MayoClinic: http://www.mayoclinic.com/health/prostatitis/DS00341