[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: (debian, eclipse 3.4)
lolveley
do-not-reply at jboss.com
Tue Mar 3 14:12:56 EST 2009
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","jeanroi at gmail.com",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
More information about the jboss-user
mailing list