I've found that, in the above code, after the define class, I'm not able to
cast the class to itself too. The class I'm manipulating implements (from the
beginning) an interface, like:
public class TestAgent extends Aglet implement RolexAgent{..}
and I access it and manipulate it as a RolexAgent. Thus, when I create the new
instance and try to cast it to a TestAgent:
TestAgent t = (TestAgent)
this.defineClass(agentName,code,0,code.length).newInstance();
I got a classcast exception. I've checked the classloader, and it's mine, thus
it should work properly. Anybody as an idea of what is happening?
Luca
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3900640#3900640
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3900640
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user