Hi all,

This kind of discussion should normally stay on devel mailing list, but I don't 
know if there are many people registered.

As you may know, Raghu found a classloading issue in JWebUnit that prevents its 
use for load testing tests. I think it's a major issue, but I don't know what 
is the best wayto solve it, and I need some help.


First, the description of the problem:

We have a Java Interface (former IJWebUnitDialog, perhaps ITestingEngine in 
future release), that each plugin should implement. Currently, we have only one 
plugin : HtmlUnit, but I hope to add Selenium one for next release.

JWebUnit provide a way to specify plugin at runtime:
   TestingEngineRegistry.addTestingEngine("myTestingEngine", 
"com.mycompany.this.class.implements.IJWebUnitDialog.theClass");
   tester.setTestingEngineKey("myTestingEngine");
   beginAt("...");

To achieve this, I'm using Class.forName(). Unfortunately, this do not play 
well with multiple threads. In fact, another famous OSS is suffering of this 
problem: commons-logging. There are many articles about this problem, 
especially:
http://www.qos.ch/logging/classloader.jsp

One solution could be to use the same solution as slf4j project. This solution 
consists in linking statically with the implementation. The drawback is you 
can't change plugin at runtime, and you can't have more than one plugin at the 
same time in the classpath.

Perhaps could we also experiment integration with a lightweight container like 
Spring to choose the implementation at runtime...


Any idea or comments?

++
Julien




        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to