"rkadayam" wrote : 1) I'm using jboss-aop with some other application servers such as 
weblogic and websphere. Would this usage construe as a jboss license violation?? The 
basic stuff works with weblogic 8.1
  | 

Absolutely not as JBoss-AOP is distributed under LGPL.  You can embed it anywhere.  
LGPL is only triggered when you modify JBoss-AOP code.

"rkadayam" wrote : 
  | 2) I'd like to jar load the interceptor classes at run-time and dynamically attach 
and detach interceptors to advice bindings.
  | 
  | I noticed that the AdviceBinding.addInterceptor(Class) takes only a "class 
argument". How can I ask the aspect manager to use a particular class-loader to 
resolve that class?
  | 
  | I tried the following from a session bean.
  | 
  | addNewInterceptor(classname) -> jar loads the class file using some jar-directory 
conventions and is able to render the interceptor class
  | 
  | attachInterceptor(pointcut,interceptor) -> does the following
  | 
  | AdviceBinding binding = new AdviceBinding(pointcut,null);
  | binding.addInterceptor(jarLoader.loadClass(interceptor));
  | aspectManager.addBinding(binding);
  | 
  | At the point of adding the binding I get the ClassNotFoundException initiated at 
the GenericInterceptorFactory. Oh! So do I provide a custom 
"JarLoadingInterceptorFactory" then? I'm going to try that out.
  | 
  | any comments/suggestions would be greatly appreciated
  | 
  | thanks
  | rajiv

Ok, I've changed the code in CVS head to not create a GenericInterceptorFactory using 
the classname, but rather it can accept the java.lang.Class itself so this should 
solve the problem if you get from head.

You can get latest from CVS and build, or, in the meantime, the problem is that the 
GenericInterceptorFactory doesn't try and resolve the class until advice bind time.  
What you may be able to do is the following


  | Class interceptorClass = ....;
  | Thread.currentThread().setContextClassLoader(interceptorClass.getClassLoader);
  | AdviceBinding.addInterceptor(interceptorClass);
  | aspectManager.addBinding(binding);
  | 

Let me know if this helps.

Bill

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828441#3828441

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828441


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to