Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Applets and AspectJ

Hi,

I am a novice in AspectJ (AOP) and would like to know if we could write AOP code for the 3rd party Applet that is loaded in the browser.
Example
ThirdPartyApplet extends Applet
{

 public void init()
{

}
}

The third party applet is packed in the jar and signed by a certificate and get loaded during user login.

I need to write an advice around the above init method.

How do i package my aspect jar?

Following technique is not applicable, because the ouput myApplet.jar that is created is by reading the thirdpartyApplet.jar and creating a clone of it and inserting my aspect class, this is violation of the thirdpartyApplet.jar as per legal agreement.
ajc -input thirdpartyApplet.jar -output myApplet.jar

Another alternative is to use the aop-ajc.xml file to load aspect during classloading.
Assume that the java plugin in the browser loads the thirdpartyApplet.jar and I need to tell the AspectJ run time to use the class loader that loaded the applet, so that my aspect can be executed.

Please let me know how to deploy my aspect. Do I need to keep the aspect implementation on the client side/server side?

Thanks,
Rhushikesh

Back to the top