Appel de méthode hors du conteneur
Bonjour,
Je suis le tutoriel suivant (http://psecheresse.developpez.com/tu...a-ee/partie1/), mais rencontre une erreur dès qu'il s'agit d'appeler une méthode hors du conteneur, l'erreur est la suivante après avoir rajouté le code suivant:
Code:
1 2 3 4 5 6 7 8 9 10
|
InitialContext ctx;
try {
ctx = new InitialContext();
Object ref = ctx.lookup("demo.ejb3.calculatrice.CalculatriceRemote");
CalculatriceRemote calc = (CalculatriceRemote)PortableRemoteObject.narrow(ref,CalculatriceRemote.class);
expResult = calc.additionner(x,y);
} catch (NamingException ex) {
fail(ex.getMessage());
} |
demo.ejb3.calculatrice.CalculatriceRemote not found.
Merci pour toute indication supplémentaire.