Introducción
Enterprise Java Beans
Modelo de componentes distribuido
Enterprise JavaBeans != JavaBeans
Cuando usar EJB
Escalable
Transacciones con integridad de datos
Variedad de clientes
Versiones
EJB 1.0
Especificación original
EJB 1.1
La primera incluida dentro de J2EE
EJB 2.0
J2EE 1.3
JSR 19
Interfaces Locales
Message-Driven beans
EJB 2.1
J2EE 1.4
JSR 153
EJB 3.0
JavaEE 5
JSR 220
Anotaciones
EJB 3.1
JSR 318
Características
Comunicación remota
CORBA
RMI/IIOP
Transacciones
JTA
Control de la concurrencia
Eventos
JMS
Servicios de nombres y de directorio
JNDI
Ubicación de componentes
JNDI
Seguridad
JCE
JAAS
Tipos
Session Beans
http://www.xmind.net/share/lshimokawa/javaee-session-beans/
Entity Beans
http://www.xmind.net/share/lshimokawa/javaee-persistencia/
Message Driven Beans
Características
Se ejecutan al recibir un mensaje del cliente
Asíncronos
Short-lived.
Transaction-aware.
Stateless
@MessageDriven
onMessage Method
The return type must be void.
Single argument of type javax.jms.Message.
Transacciones
Introducción
Integridad de datos
Unidad de trabajo indivisible
Termina en un commit o rollback
Tipos
Container-Managed Transactions
EJB container sets the boundaries of the transactions
Para session message-driven
Transaction Scope
Required: TransactionAttributeType.REQUIRED
RequiresNew: TransactionAttributeType.REQUIRES_NEW
Mandatory: TransactionAttributeType.MANDATORY
NotSupported: TransactionAttributeType.NOT_SUPPORTED
Supports: TransactionAttributeType.SUPPORTS
Never: TransactionAttributeType.NEVER
Rollback
Unchecked exceptions
setRollbackOnly
No utilizar
The commit, setAutoCommit, and rollback methods of java.sql.Connection
The getUserTransaction method of javax.ejb.EJBContext
Any method of javax.transaction.UserTransaction
Bean-Managed Transactions
javax.transaction.UserTransaction
begin
commit
rollback
No utilizar
setRollbackOnly
setRollbackOnly
Seguridad
Características
Authentication
Authorization
Data integrity
Confidentiality
Non-repudiation
Quality of Service (QoS)
Auditing
Mecanismos
Java SE
Java Authentication and Authorization Service (JAAS)
Programmatic user authentication and authorization
Java Generic Security Services (Java GSS-API)
Token-based API
Kerberos
Java Cryptography Extension (JCE)
Encryption
Key generation and key agreement
Message Authentication Code
Java Secure Sockets Extension (JSSE)
SSL and TLS protocols
data encryption
server authentication
message integrity
optional client authentication
Simple Authentication and Security Layer (SASL)
JavaEE
Application-Layer Security
Transport-Layer Security
Message-Layer Security
Application Server
Usuarios
Realm
User
Group
Role
EJB
javax.ejb.EJBContext
java.security.Principal getCallerPrincipal();
boolean isCallerInRole(String roleName);
Acerca de
Topic
Topic