Précédent   Forum du club des développeurs et IT Pro > Java > Serveurs, conteneurs, et Java EE > Java EE
Java EE Forum d'entraide sur la norme Java EE (EJB, JMS, etc.). Avant de poster -> FAQ Java EE
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 01/11/2012, 11h50   #1
sheridan08
Membre du Club
 
informatique
Inscription : novembre 2009
Messages : 114
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : informatique

Informations forums :
Inscription : novembre 2009
Messages : 114
Points : 46
Points : 46
Par défaut Problème de compilation

Bonjour a tous , j'ai crée deux classe que voici :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Panier;
import java.util.*;
 
import javax.ejb.Remote;
@Remote
public interface panier {
	public void ajouterarticle(int idarticle);
	public void suprimerarticle(int idarticle);
	public Vector listerarticles();
	public void setnom(String nomclient);
	public String getnom();
	public void remove();
 
}
et
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package Panier;
 
import java.util.*;
import javax.ejb.Remove;
 
import javax.annotation.PostConstruct;
import javax.ejb.Stateful;
@Stateful 
public class panierbean implements panier {
 private Vector articles;
 private String nomclient;
 @PostConstruct 
 public void initialise()
 {articles =new Vector();
 nomclient="";
 
 }
 
	@Override
	public void ajouterarticle(int idarticle) {
		// TODO Auto-generated method stub
		System.out.println("ajout d'un nouveau article");
		articles.add(new Integer(idarticle));
 
	}
 
	@Override
	public void suprimerarticle(int idarticle) {
		// TODO Auto-generated method stub
System.out.println("suppresson d'un article");
articles.remove(new Integer(idarticle));
 
	}
 
	@Override
	public Vector listerarticles() {
		// TODO Auto-generated method stub
		return articles;
 
	}
 
	@Override
	public void setnom(String nomclient) {
		// TODO Auto-generated method stub
this.nomclient=nomclient ;
	}
 
	@Override
	public String getnom() {
		// TODO Auto-generated method stub
		return nomclient ;
	}
 
  @Remove
	public void remove() {
		// TODO Auto-generated method stub
		articles=null;
 
	}
 
}
j'ai un probleme pour la creation du client pour le test du bean , lorsque je fait import Panier.* ;
l'instruction n'est pas accepté
quelle genre de projet doit je créer pour le test du bean: EJB Project ou Application client project ?
merci de votre comprhension
sheridan08 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/11/2012, 18h36   #2
sheridan08
Membre du Club
 
informatique
Inscription : novembre 2009
Messages : 114
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : informatique

Informations forums :
Inscription : novembre 2009
Messages : 114
Points : 46
Points : 46
bonsoir a tous , je voulée juste indiquer que mon problème est résolue et que pour créer un client Bean , il suffit de choisir un projet de type "application client project .
sheridan08 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Cette discussion est résolue.
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 07h09.


 
 
 
 
Partenaires

Hébergement Web