1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| public class test2 {
@EJB
private static PiecesFacadeLocal pf;
public static void main(String[] args) {
Context initialContext;
try {
PiecesPK pk=new PiecesPK("hhh","445");
Pieces p=new Pieces(pk,"hhh", "jjk", "4555", "hhgf", "478522", "45855", 0);
initialContext = new InitialContext();
pf = (PiecesFacadeLocal) initialContext.lookup("ejb.PiecesFacadeLocal");
pf.create(p);
} catch (NamingException ex) {
Logger.getLogger(test2.class.getName()).log(Level.SEVERE, null, ex);
}
}
} |
Partager