java - Generic logging of all calls to an EJB (2.1)? -


I am working to modify an existing application that has been implemented as 2.1 Stateless EJB. I want to launch all the calls made for any type of generic, detailed, EJB.

The stuff I want to log in:

  • the name
  • the serialized copy of all the criteria
  • return value The serialized copy of

I used to send a hook before sending it to the Asp.Net REST web service before processing it and before it is answered it generates too many data. It does, but it is worth it to debug a long running system.

I'm not sure how this can be done for EJB. I would like to avoid AOP because the AOP is not used in the application. Interceptor will not work because it is not EJB 3.0.

Do anyone know how to hook into the EJB processing pipeline that they come in the form of a request? Is there another way to do this?

Thanks

I think that in two ways two ways to know That's when a method of EJB (or any other class) is called:

  • Bad solution: Using Java Debug Interface (JDI), you know which row is executed As you know, when you are debugging Java with your IDE, it's complicated and there are some problems when you have a DB in the same JVM Ing are, where JDI runs on. Good solution: As Thomas Owens says, AOP is a recommended solution if you are not using it in your project, then it is a good reason to use it.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -