On most of the driveshafts,that stub is part of the shaft itself...they sell rebuild kits but machining is required to make the new ball and needle bearings fit the stub,you had to turn down the stub on a lathe ,sometimes they would spray weld it and then machine it to size---at least thats how it was done 20 years ago,today they probably reccomend scrapping the shaft since everything is disposeable nowadays..
On old trucks that had a yoke like a differential on the front output shaft,the ball socket dewhickey was part of the driveshaft yoke that bolted to the t-case yoke with 4 bolts ,5/16" x about 2" long,the ball socket part of the yoke had 4 threaded holes in it...so the ball socket & needle bearings could easily be replaced,but if the "stub" they ride on was worn,you'd have to have it re-worked at a machine shop..later ones with the big "ring" with 4 bigger bolts had the ball socket made into the CV yoke assembly..