I have a CommandEJB,which local interface and home is CommandLocal and CommandLocalHome.I use this CommandEJB to execute classes that implements the Command interface:
interface Command{ void execute() throws CommandExecuteException; } here is the CommandEJB: public class CommandEJB implements SessionBean { .... public void execute(Command command) throws CommandException{ command.execute(); } } I put CommandEJB.class,Command.class,CommandException.class,CommandLocal.class and CommandLocalHome.class into my-ejb.jar and deploy it as an EJB. And I put Command.class,CommandException.class,CommandLocal.class and CommandLocalHome.class into my-client.jar and place it into web module's WEB-INF/lib. Now I test it from my test.jsp: 1 Context ctx=new InitialContext(); 2 Object home1=ctx.lookup(CommandLocalHome.JNDI_NAME); 3 out.println(home1.getClass().getInterfaces()[0]); 4 CommandLocalHome home2=(CommandLocalHome)home1; If line 4 is deleted, the jsp runs successfully,but if line 4 exists,ClassCastException will be raised. Is it a bug of JBoss' class loader? How to resolve it? Thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879254#3879254 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879254 ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user