Esqueleto de proyecto inicial.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package managedbean.systemAdmin;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
import ejb.systemAdmin.SystemAdminFacadeRemote;
|
||||
|
||||
/**
|
||||
* ManagedBEan que gestiona la edición y actualización de una especialidad
|
||||
* médica.
|
||||
*
|
||||
* @author mark
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "SystemAdminMBean")
|
||||
@SessionScoped
|
||||
public class SystemAdminMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@EJB
|
||||
private SystemAdminFacadeRemote remoteManager;
|
||||
|
||||
/**
|
||||
* Constructor. Inicializa la conexión con el EJB Remoto
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public SystemAdminMBean() throws Exception {
|
||||
initializeAdminFacadeRemote();
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicializa la conexión con el EJB Remoto
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (SystemAdminFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.SystemAdminFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user