Bonjour tout le monde
J'ai besoin de quelques conseils sur appel remote/local
SA: jboss 4.2
JSF
EJB3
hibernate
Bref puisque l'annotation @EJB "injection" n'est pas encore supporter sur jboss server (4.2) le fameux error
ERROR [JBossInjectionProvider] Injection failed on managed bean.
DONC j'utilise ce but de code pour le lookup dans mes mannaged Bean
TechnologieBeanRemote TB()throws NamingException {
Context jndiContext;
jndiContext= new InitialContext();
Object ref = jndiContext.lookup("/projet EAR/SessionBean/remote");
SessionBeanRemote sessionBean = SessionBeanRemote)ref;
return technologieBean;
}
///////////////////////////////////
public static Context getInitialContext()
throws javax.naming.NamingException
{
return new javax.naming.InitialContext();
}
Jusqu'à Maintenant tous va bien avec les interfaces Remote je me demande
*c'est correcte de travailler avec mes interface remote sinon comment je peux faire pour appeler interface local
suffit il de mettre
*si je continue avec le lookup sur mes interface Remote cela va t'il surcharger mon serveur ..appels distants !!Object ref = jndiContext.lookup("/projet EAR/SessionBean/local");
SessionBeanLocal sessionBean = (SessionBeanLocal)ref;
NB:l'application est déployer sur le même serveur d'application..c'est un site intranet
Tous explication et commentaire sera le bienvenue
Merci d'avance a tous
Partager