Hi All, I am working on a LoadGenerator Application for EJBs Brief Description of My Application is: When a J2EE application client(JBOSS/WebSphere/WebLogic) is interacting with any J2EE Application Server(esp. JBOSS, WebSPhere and Weblogic), i want to intercept the EJB invocations only from client side (request and response) and send these invocations to my Test Application through RMI where these invocations are stored(recorded) so that i can replay these real time interactions later. The problem is i want to intercept the invocations without any source code changes in existing J2EE application client For JBOSS i have done it because JBOSS provides its own interceptor mechanism and i can intercept the invocations and send it to my application(through RMI) without any change in the J2EE Application client source code. But i dont know how can i make it more generic so that it works for J2EE Application Clients from JBOSS, WebSphere, WebLogic. Please give me some guidelines/help so that i can work further. If you know any open source lightweight library/framework that can do interceptions of invocations on existing client with, it would also be helpful for me.
- Posted by: Rashid Mahmood
- Posted on: August 15 2008 10:18 EDT
Maybe the above description is a bit messy. My Target is intercept invocations(Reuqest & Response) made by a J2EE Client(JBOSS, WebSphere, Weblogic)without changing the client source code, so that i can record them in XML form. Actually i found different possible ways to do it - Using PortableInterceptors (can be set by VM params) Problem: Not Supported by Weblogic - RMI Stub Proxy (Dynamic Proxy) http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-rmi.html Problem: Maybe application servers provide theri own implementation of RMI(Not Sun implementation) Other possibilities i think could be (More details needed) - AOP - Byte Code Rengineering It would be nice if all of you may participate in the discussion and share your ideas about different possibilities.
I think what you need is a Proxy Design Pattern http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-proxy.html Java too has in built support for Proxy pattern.
Thanx. Can such a dynamic proxy solution will work on existing running J2EE client application? And am i able to get fine grained information from with solution like in case of Jboss J2EE Client Application getting information contained in Invocation object like payload maps, invocation context etc. I need some guidelines how can i incorporate such a generic solution for my problem