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.
Why you want to override service method?
Generally it is not adviced to override service method. whatever code one wants to write should be written in dGet/doPost methods.
Answer to your question:-
Is depends upon how you want to use class A and B.
If the need is such that each request should have their own copy of A and B objects then you have to write the code of object creation in doGet/doPost method otherwise if the A and B objects can be shared by different threads then you can use sessions or context.