Beans esqueleto actualizados.
This commit is contained in:
@@ -1,51 +1,27 @@
|
|||||||
package managedbean.medicalTest;
|
package managedbean.medicalTest;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import javax.ejb.EJB;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.naming.Context;
|
|
||||||
import javax.naming.InitialContext;
|
|
||||||
|
|
||||||
import ejb.medicalTest.MedicalTestFacadeRemote;
|
import managedbean.common.ManagedBeanBase;
|
||||||
|
|
||||||
/**
|
|
||||||
* ManagedBEan que gestiona la edición y actualización de una especialidad
|
|
||||||
* médica.
|
|
||||||
*
|
|
||||||
* @author mark
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Named("MedicalTestMBean")
|
@Named("MedicalTestMBean")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class MedicalTestMBean implements Serializable {
|
public class MedicalTestMBean extends ManagedBeanBase implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@EJB
|
public MedicalTestMBean() {
|
||||||
private MedicalTestFacadeRemote remoteManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor. Inicializa la conexión con el EJB Remoto
|
|
||||||
*
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public MedicalTestMBean() throws Exception {
|
|
||||||
initializeAdminFacadeRemote();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@PostConstruct
|
||||||
* Inicializa la conexión con el EJB Remoto
|
public void init() {
|
||||||
*
|
// Inicialización de variables y propiedades van aquí.
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
private void initializeAdminFacadeRemote() throws Exception {
|
|
||||||
Properties props = System.getProperties();
|
|
||||||
Context ctx = new InitialContext(props);
|
|
||||||
remoteManager = (MedicalTestFacadeRemote) ctx
|
|
||||||
.lookup("java:app/myHealth.jar/MedicalTestFacadeBean!ejb.component.MedicalTestFacadeRemote");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Como realizar llamadas al EJB Remoto
|
||||||
|
// this.getRemoteManagerSystemAdmin().MetodoEJB
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +1,28 @@
|
|||||||
package managedbean.systemAdmin;
|
package managedbean.systemAdmin;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import javax.ejb.EJB;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.naming.Context;
|
|
||||||
import javax.naming.InitialContext;
|
|
||||||
|
|
||||||
import ejb.systemAdmin.SystemAdminFacadeRemote;
|
import managedbean.common.ManagedBeanBase;
|
||||||
|
|
||||||
/**
|
|
||||||
* ManagedBEan que gestiona la edición y actualización de una especialidad
|
|
||||||
* médica.
|
|
||||||
*
|
|
||||||
* @author mark
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Named("SystemAdminMBean")
|
@Named("SystemAdminMBean")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class SystemAdminMBean implements Serializable {
|
public class SystemAdminMBean extends ManagedBeanBase implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@EJB
|
public SystemAdminMBean() {
|
||||||
private SystemAdminFacadeRemote remoteManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor. Inicializa la conexión con el EJB Remoto
|
|
||||||
*
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public SystemAdminMBean() throws Exception {
|
|
||||||
initializeAdminFacadeRemote();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@PostConstruct
|
||||||
* Inicializa la conexión con el EJB Remoto
|
public void init() {
|
||||||
*
|
// Inicialización de variables y propiedades van aquí.
|
||||||
* @throws Exception
|
|
||||||
*/
|
// Como realizar llamadas al EJB Remoto
|
||||||
private void initializeAdminFacadeRemote() throws Exception {
|
// this.getRemoteManagerSystemAdmin().MetodoEJB
|
||||||
Properties props = System.getProperties();
|
|
||||||
Context ctx = new InitialContext(props);
|
|
||||||
remoteManager = (SystemAdminFacadeRemote) ctx.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.SystemAdminFacadeRemote");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +1,28 @@
|
|||||||
package managedbean.visit;
|
package managedbean.visit;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import javax.ejb.EJB;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.naming.Context;
|
|
||||||
import javax.naming.InitialContext;
|
|
||||||
|
|
||||||
import ejb.visit.VisitFacadeRemote;
|
import managedbean.common.ManagedBeanBase;
|
||||||
|
|
||||||
/**
|
|
||||||
* ManagedBEan que gestiona la edición y actualización de una especialidad
|
|
||||||
* médica.
|
|
||||||
*
|
|
||||||
* @author mark
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Named("VisitMBean")
|
@Named("VisitMBean")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class VisitMBean implements Serializable {
|
public class VisitMBean extends ManagedBeanBase implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@EJB
|
public VisitMBean() {
|
||||||
private VisitFacadeRemote remoteManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor. Inicializa la conexión con el EJB Remoto
|
|
||||||
*
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public VisitMBean() throws Exception {
|
|
||||||
initializeAdminFacadeRemote();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@PostConstruct
|
||||||
* Inicializa la conexión con el EJB Remoto
|
public void init() {
|
||||||
*
|
// Inicialización de variables y propiedades van aquí.
|
||||||
* @throws Exception
|
|
||||||
*/
|
// Como realizar llamadas al EJB Remoto
|
||||||
private void initializeAdminFacadeRemote() throws Exception {
|
// this.getRemoteManagerSystemAdmin().MetodoEJB
|
||||||
Properties props = System.getProperties();
|
|
||||||
Context ctx = new InitialContext(props);
|
|
||||||
remoteManager = (VisitFacadeRemote) ctx.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.VisitFacadeRemote");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user