LM317 to create constant current of 2mA?
note: question was originally about a current limiter  

The LM317 with the single series resistor between output and adjust input is actually a fixed current source, not a current limiter. You don't need the LM317 to create a current limiter, a few discrete components will do:  



For a limiting at 2mA you select a 330\$\Omega\$ resistor for \$R_{SENSE}\$. If there flows 2mA through it Q2 will start to conduct and reduce the base voltage of Q1, so that its current is cut off.  

edit (re changed question)
Maybe you're focusing too much on the LM317. If you need a constant current you could use the LM234 which is a programmable current source for up to 10mA. You set the current with a resistor.