This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
One thing I can say is that this function is waaay too big. You should factor parts out to smaller functions so it's easier to see one level of abstraction at a time. Hide implementation details behind intention-revealing function names. That's one way to get a handle on the complexity of the code.