[jboss-user] [JBoss AOP] - Re: About multiple introductions and mixins

elysch do-not-reply at jboss.com
Tue May 6 14:53:39 EDT 2008


Thank you very much for your prompt response (sorry for the "Spanish" part, though)

"kabir.khan at jboss.com" wrote : I got a bit lost in the translation of your code, so I am not sure. But it looks like you have some problems in your java code. Java allows you to cast any object to any interface, and as long as the method exists there you should be fine.

YES!!!!, You're right, I was just making a simple Java mistake and blaming the AOP introduction's

I got it to pass that error message changing the handleEncuentraVacantes method (posted before)


Instead of doing this:
        List vacantes = getVacanteDao().encuentraConCriterios(criteria);

doing this:
        List vacantes = ((com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.IAspectoVacanteDao) getVacanteDao()).encuentraConCriterios(criteria);

A simple cast.

Of course I had to add an include to the Introduction Interface:
import com.mitalteli.bolsaDeTrabajo.useCaseSlices.specific.consultarVacantes.IAspectoVacanteDao;

Is that right? That's what I had to do?


I have to fix a loooot of other errors, but, I hope I manage to get through all them too. Even if I'm not that experienced with Java programming.

THANK YOU VERY, VERY,    VERY MUCH.

Ely.

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

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



More information about the jboss-user mailing list