Here is the most general solution I can think of. Should work in any version of opengl.
Divide your minz and maxz into acceptable ranges. In your example you might use the following ranges: [0.03, 3], [3, 3000], [3000, 30000], [30000, 30000000] Then render the whole scene for each range and use the values in frustum minz and maxz.
How many ranges to use depends on the resolution of the depth buffer. You need less iterations with a 32 bit depth buffer compared to a 16 bit.
This is of course a bit slow
, but It's easy to do in opengl. Don't know if it's possible in java3d. You would need a way to change the frustum when rendering the graph, or a way to do multipass rendering. Anyone got any idees?