I toke this photo out of the JD3140 book just to show you the gaskets under the gearshiftcover. I do not have the JD 2240 book.
Several things:
I don't have a JD2240 book either. I do have the 2120 Technical Manual - but not Parts, and not Shop Manual. In the transmission section of the 2120 tech manual, one of the top views of the transmission shows a hole that looks just like the one that is spouting. But unfortunately it doesn't say a word about that hole or why it is there.
Lots of JD tractors during that era used variations on the same transmission design, the collar shift 8/4 or powershift 16/8. Since the hole shows on three of the models we've looked at, I am assuming that it shows on most.
BTW, I never got a reply to whether it was threaded or not - but a vertical hole would have to be threaded & plugged.
The reason I asked about parts 15 & 16 is that the picture that DLTTreckers posted seems to show an item that fits into the hole. Kinda out of focus, but looks like it might be a pressure regulated breather. Could that part have gone missing?
Back to the hole itself, I figure something is missing because I cannot imagine that any designer or manufacturer is going to be dumb enough to allow an unprotected open vertical hole like that in a casting where it would hold water and dirt. And certainly not a hole that can communicate with the inside of the tranny as this one is doing. You wouldn't expect that on the cheapest import, and certainly JD is better than that. If JD had to put a hole there for some manufacturing reason, then good design practice would demand that the hole be threaded and/or plugged. So why not simply put a fitting into the hole to seal it? It could be as simple as a screw and washer.
But whatever goes there, if it were my problem I'd simply go over to the local JD dealer and order whatever part their part book says fits into that hole. Done.
The problem isn't unknown on TBN. Apparently there was a thread on the same problem back in 2014, - but the thread dead ends.
http://www.tractorbynet.com/forums/parts-repairs/328189-jd-2240-leaking-hydraulic-oil.html
rScotty