-
1. Re: How to log remote access
adrian.brock Aug 28, 2002 8:54 AM (in response to ejain)The log interceptor already does some
basic call logging when enabled.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
You could always write your own interceptor to perform
the logging required.
Second question,
java.rmi.server.RemoteServer.getClientHost()
this assume all requests use JRMP.
Regards,
Adrian -
2. Re: How to log remote access
mr_marcin Aug 30, 2002 7:33 PM (in response to ejain)hi, I have the same problem.
I have added java.rmi.server.RemoteServer.getClientHost()
call to LogInterceptor, and all seems to work fine, but only if I call EJB session bean method (I use logging for this purpose) from stand alone client. When I access the same bean from .jsp page I get error ServerNotActiveException.
So in what way should I get ClientHost in that case.
Thanks for any help. -
3. Re: How to log remote access
adrian.brock Aug 31, 2002 10:15 AM (in response to ejain)The only way to do this across different protocols
is to write a client interceptor (JBoss3 only).
The client interceptor can retrieve the client host
name (probably during static initialisation)
and then add it to every invocation object sent.
invocation.setValue("ClientHost", hostName);
The server's log interceptor can then retrieve it.
String client = (String) mi.getValue("ClientHost");
Again, this will only work when the client is a java
client. A c++ corba client cannot run the client
interceptor.
Also, this will show the server hostname when accessed
through JSP.
Regards,
Adrian -
4. Re: How to log remote access
mr_marcin Aug 31, 2002 7:25 PM (in response to ejain)Thank a lot, seens it could work from one side, from another its not as simple I thought it could be.
I'll try to write that client interceptor, and hopes it will not tak much time and will work.
Maybe somebody has another idea?
Anyway thanks again,
PS I'm sorry for posting this on two forums.