Ver Mensaje Individual
  #8 (permalink)  
Antiguo 08/09/2006, 09:08
Avatar de pyanqn
pyanqn
 
Fecha de Ingreso: noviembre-2005
Mensajes: 331
Antigüedad: 18 años, 6 meses
Puntos: 8
Ahora si esta es la salida de JBoss de pues de disparar newCliente(String,String) desde el cliente. Como sigue hago la llamada al cliente...

public void btnNuevo_actionPerformed(ActionEvent actionEvent) {
String nombre = txtNombre.getText();
String dire = txtDireccion.getText();
try{
clienteEJB.newCliente(nombre, dire);
}
catch(Exception err){err.printStackTrace();}
}

Y defino el contexto:

public Frame1() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
//A continuacion se carga el contexto y otras cosas
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.int erfaces.NamingContextFactory");
p.put(Context.PROVIDER_URL,"jnp://srv_backup_xp:1099");
Context contexto = new InitialContext(p);
Object ref = contexto.lookup("ClientesSes");
System.out.println("Contexto encontrado...");
clientesSesHome = (ClientesSesHome) PortableRemoteObject.narrow(ref,ClientesSesHome.cl ass);
clienteEJB = clientesSesHome.create();
}
catch (Exception exception) {
exception.printStackTrace();
}
}