"ad-rocha" wrote : 
  | I have some test cases implemented using JUnit, so these classes (Test1, Test2) 
  | extends TestCase. I've created a new class (MyTestCase) that extends and modify 
  | TestCase default implementation, adding new fields and methods.
  | 
  | 
  | Compiling with AspectJ I can force my test cases to extends MyTestCase instead 
  | TestCase and perform the new behavior...
  | 
  | Andrea

Hi!

I've compared two approaches and I think it is impossible to realize your 
UseCase with JBossAOP.

Comparing to AspectJ in field of introductions JBossAOP is quite weak. 
It is "..% pure Java" and that's the reason.

As I understood your case, you want some of your test cases to have different 
behaviour by not extending plain TestCase, but your custom MyTestCase, with 
custom 'setUp' and 'tearDown' methods for database connection initialization 
for example.

AspetJ will simply put yout MyTestCase class between YourTestCase and TestCase 
in class hierarchy. This way you can use 'setUp()' method in YourTestCase and 
override it in MyTestCase.setUp().

With JBossAOP mixins it is not possible to achieve exact the same situation 
because of problem with:
Caused by: java.lang.Exception: Mixin syntax.Base of pointcut 
  | file:/jboss-aop.xml0 is trying to apply an already existing method setUp for 
  | class syntax.Pojo

When speaking about introductions: can someone give some answer why do we 
really need "100% pure Java" in JBossAOP?

I know about this requirement of loading classes without compiling under JBoss AS.
But anyway, in the end they have to be compiled by 'javac' compiler.. 
So, if there would exist 'jbossaopc' instead of 'javac' (similar to aspectj), 
then there is no problem... or am I missing sth?

Regards,
 Tomasz

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

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


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to