which methods executed in servlet ,sessionbean,DAO and their class names

lets say

in my application i have one jsp

that jsp is calling servlet --> ejb --->dao

say i am executing one long scenario in the application

while going to these process  servlet will execute some methods,
 session bean  will execute some methods and same in the case of DAO finally we will the desired result;

In this process i want to know which methods(i wanted to know method names)  it has executed in servlet ,sessionbean,DAO and their class names;






LVL 20
chaitu chaituAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

petmagdyCommented:

try this:
Thread.currentThread().dumpStack();
0
girionisCommented:
0
chaitu chaituAuthor Commented:
hi petmagdy

in API This dumpStack() METHOD is used only for debugging;

where should i put this method;

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

petmagdyCommented:
try to put it at the end of your servlet service and inside ur DAO call
0
girionisCommented:
I do not think there is a standard way to do it. There is an undocument package sun.reflect.Reflection that gets the calling class but that's more or less it. You will need to throw an exception and find out where it is being thrown (what methods) and follow up the stack trace tree.

I think this is the closest you can get to it: http://java.sun.com/developer/JDCTechTips/2003/tt0318.html#2
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
girionisCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.