I forgot the client class : 
public static void main(String[] args) {
  |             
  |             try {
  | 
  |                     Context ctx=new InitialContext();
  |                     
  |                     Object 
rem0=ctx.lookup("petstore_ear/CustomerBean/remote");
  |                     ejb.customer.CustomerRemote rem =
  |                           (ejb.customer.CustomerRemote) 
PortableRemoteObject.narrow(rem0,
  |                              ejb.customer.CustomerRemote.class);
  | 
  |                     
  |                     rem.createCustomer(new 
Customer(1L,"jambon","rose","jean","bonrause","0018654118","[email protected]",new
 java.util.Date(1978,02,10),19,null),new source_jpa.Address(1,"4 rue des 
roses","","METZ","Moselle","57000","FRANCE"));
  |                     
  |                     
  |                     System.out.println ("--- Hello, clients ---");
  |                     for (source_jpa.customer.Customer client : 
rem.findCustomers()) {
  |                             System.out.println ("client : "+client);
  |                     }
  | 
  |             } catch (Exception e) {
  |                     e.printStackTrace();
  |             }
  |             
  |     }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214661#4214661

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214661
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to