-
Modos
-
Stateless Session Beans
- @Stateless
-
Stateful Session Beans
- @Stateful
- @Remove
-
Ciclo de vida
- Stateless (fuente: JavaEE Tutorial de Sun)
- Stateful (fuente: JavaEE Tutorial de Sun)
- MessageDriven (fuente: JavaEE Tutorial de Sun)
-
Anotaciones
- @PostConstruct
- @PreDestroy
- @PostActivate
- @PrePassivate
-
Métodos
- No debe empezar con ejb
- public
- No puede ser static ni final
- Si es remoto los argumentos deben ser compatibles con RMI
- Si es un Web Service los argumentos deben ser compatibles con JAX-WS
-
Acceso a clientes
-
Remote Clients
-
Puede correr en
- Diferente PC
- Diferente JVM
-
Puede ser
- Web component
- Application client
- Otro enterprise bean
- Ubicación transparente
- @Remote
-
Local Clients
-
Puede correr en
- Solo en la misma JVM
-
Puede ser
- Web component
- Otro enterprise bean
- Ubicación no transparente
- @Local
-
Timer Service
- @Timeout
- @Resource TimerService timerService;
- timerService.createTimer(intervalDuration, "Created new timer");
-
Acerca de
- Topic
- Topic