Hi, Thank you so much for the reply. I guess I would have to modify the bytecode and xml specification for the data (since the application has been written to use SOAP). If that's the case, then I wonder if aspectj can help me at all in modularizing this work.
I am thinking of doing something as below using aspectj. 1. Write a client side aspect which has a nested static class inside it. The class implements a remote method. The remote method will save the extra data in the object every time the data is available from the HTTP request. 2. Write a server side aspect such that , before the actual EJB call, make a remote method call to get the data and then proceed further with the actual call., I understand that there is an extra overhead in making RMI call for every request received from the Front-end to the Business logic. But I am wondering if this will even work and can be done using aspectj. It would be great if someone can tell me if this can be done using aspectj . If yes, will it solve my problem. Highly appreciate any help. Thanks, Ashiwan > Message: 2 > Date: Mon, 5 Dec 2011 08:45:02 -0800 > From: Andy Clement <[email protected]> > To: [email protected] > Subject: Re: [aspectj-users] Using Aspect to pass a metadata as a new > parameter through SOAP > Message-ID: > <CAAu=NOk7qhso4T1ZR-Tk-LkXvxAeXUqTkt=t1KB8=3sggbn...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > >> I don't think aspect provides a way to send an extra parameter through >> SOAP to a VM on another machine. > > No there is no built in support for this in AspectJ, you'd need to > modify the call side and server side to add/process the extra data > respectively, but if to do that you need to modify something other > than bytecode (e.g. an xml spec for the data being transferred) then > it won't able to help you. > > But if you just need to pass something from the top to the bottom of a > call sequence within one VM, you can use the wormhole pattern. There > are probably other references but a quick google turned up this one: > > http://www.theserverside.com/news/1365184/Part-2-The-Techniques-of-the-Trade > > This pattern enables you to pass something from the top to the bottom > of the control flow without adding a parameter to all methods in > between. > > cheers > Andy > > On 2 December 2011 06:32, Ashiwan.S. <[email protected]> wrote: >> Hi All, >> >> Sorry to bother you with email. I am new to aspectj and finding it >> really useful to write modular cross cutting concerns. >> I am trying to implement a distributed tracer for an enterprise web >> application, which uses a Metadata object >> passed along the requests. I am trying to use aspects to automate the >> process of adding the metadata to HTTP header. But I am facing a road >> block in using aspects. >> >> 1. The Architecture of my application goes as below: >> >> Users ----> (HTTP) FE ---------> (SOAP or RMI) BS (SOAP/RMI)----------> BE >> >> The application is written using J2EE. The web container talks to the >> EJB container through SOAP. It uses the Axis implementation of the >> soap protocol. >> >> 2. Till the FE-Endpoint(where it makes a call to the BS), the HTTP req >> is passed as argument along all the function calls. So I added the >> metadata as string in the header. This code is modular. >> >> 3. But from the End point at FE, when a soap call is made to BS(Web >> service) the appropriate method is run . This is done through SOAP (as >> SOAP messages). I have to modify all function calls in the flow from >> FE to BS and BS to BE to carry extra parameter (which is the >> metadata). I also need to modify the WSDL document which the SOAP >> server, client agree upon to notify this new parameter.??I am trying >> to figure out if this can be automated using aspect too. >> >> I don't think aspect provides a way to send an extra parameter through >> SOAP to a VM on another machine. >> >> I would be much happy if someone can please let me know if this can be >> done using aspects. >> Highly appreciate any pointers or a quick work around in this regard. >> >> -Ashiwan >> _______________________________________________ >> aspectj-users mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > ------------------------------ > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > End of aspectj-users Digest, Vol 82, Issue 2 > ******************************************** -- -Ashiwan _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
