salut,
j'ai créé un programme avec netbeans 6.9 et glassfish 3.
ce programme comprend 3 projets : une librairie de classes contenant une interface pour un ejb (interface ne comprenant qu'une méthode, "disBonjour", avec une ligne dedans : "return "bonjour";".
l'EJB est dans son propre enterprise application, de même que le client (qui contient dans sa méthode Main:
voici un résumé de mon programme.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 public class Main { @EJB private static NewSessionBeanRemote newSessionBean; /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here System.out.println(newSessionBean.disBonjour()); } }
le programme tourne quand je le lance dans netbeans mais j'aimerais savoir comment l'exécuter hors de l'EDI, et là j'ai un problème: je ne vois pas quelle commande lancer.
j'ai bien réussi à déployer l'EJB (je l'ai vu sur la page d' administration de glassfish (http://localhost:8080)), mais à partir de ma console je n'arrive pas à lancer les jars et à obtenir le résultat escompté.
pourriez-vous me dire si c'est correct d'avoir l'ejb déployé sur le serveur et comment lancer le jar du client ("java -jar xxx.jar")?
j'arrive lancer glassfish manuellement (hors de l'EDI) mais je n'arrive pas à obtenir le résultat sur la console.
merci,
olivier
Partager