These are some of the hints that I pulled out from EJB 3 in Action, Pro EJB 3.0, EJB 3 from O'Reilly. I've put them here to serve as an easy reference and tips for those appearing for the SCBCD 5.0 exam. The list will keep growing, so keep watching...
2. In a relationship between two Entities, the entity side that has the reference to the other entity is said to be the owning side of the relationship. This is usually represented as the @JoinColumn? Annotation.
3. Use the @PersistenceContext? annotation to get hold of the Container-Managed-Entity Manager.
4. Container Managed Entity Manager comes in two flavours, Transaction Scoped and Extended Scope.
5. All container managed entity managers depend on JTA transactions.
6. JPQL specifies two types of parameter binding, namely Positional Parameter Binding and Named Parameter Binding.
7. Session Beans-Some rules that governs them
8. Bean life cycle callbacks can be implemented in the bean class itself or be defined in a separate interceptor class.
9. Bean life cycle callbacks should all have a void return type, and callbacks cannot throw any checked exceptions (any exception that doesn't have JavaDoc:java.lang.RuntimeException as a parent).
10. Some rules governing Message Driven Beans (MDB)
11. Six properties of the @activationConfig parameter of the @MessageDriven? Annotation,
12. The objects that you can assign to the non-transient fields of a Stateful session bean instance are,
13. Out of the 6 transaction attributes, Supports, RequiresNew?, Mandatory and Never are the ones that have a client initiated transaction context and these do not apply to MDB.
14. Transaction isolation is defined in terms of isolation conditions called dirty reads, repeatable reads, phantom reads.
15. The minimum annotations required for an Entity Bean in EJB 3.0 are @Id and @Entity.
16. Entity Bean are not required to be Serializable; it is needed only when sending the bean in response to a remote call.
17. The primary key for an Entity bean can be a class or a primitive.
18. The persist(), find(), getReference(), merge() and remove() methods all throw an JavaDoc:java.lang.IllegalArgumentException if the parameter passed to them is not an entity type.
19. MessageDrivenContext? extends from the EJBContext and only the transactional methods are available to the MDB's, while invoking the other methods with a MessageDrivenContext? results in a RuntimeException?.
20. Considerations for an ORM framework often circles around the following issues:
21. The difference between using @Transient annotation and transient keyword is that, using the annotation makes the value to be retained when the object containing this annotated field is serialized across JVM's.
22. The difference between getReference() and find() of an Entity operation is that the getReference() always returns a reference to the proxy object rather than the original target entity. The hetReference() is mostly useful in cases where there are relationships being built when persisting such entities.
23. Cascade settings for entity persistence are uni directional, which means that the setting must be explicitly specified on both sides of the entity relationship.
24. The three Date types in the java.sql package is mapped to the Date datatype in the database. The other two Date types in the java.util package (namely the java.util.Date and java.util.Calendar) are also mapped to the Date type in the database provided that they require the use of @Temporal (TemporalType?.DATE/TIME/TIMESTAMP) mappings to the attribute in the entity.