Version 7

    Migration from Preview 5 to EJB 3.0 Beta

    This document discusses how you can upgrade your Preview 5 applications of EJB

    3.0 with EJB 3.0 Beta.  It kinda also is a diff between the EDR2 and Public

    Draft of the specification.

     

    persistence.xml and .par packages

    There is no more hibernate.properties or hibernate.cfg.xml.  A spec mandated

    XML file is now the way to configure everything.  Please read the packaging

    tutorial and entitymanager tutorial.

     

    No more @Inject

    @Inject has been removed from the specification.  To inject EntityManager, use

    the new @PersistenceContext annotation or the @PersistenceUnit annotation if

    you are injecting EntityManagerFactory.

     

    @AssociationTable -> @JoinTable

    @AssociationTable has been renamed to @JoinTable

     

    Security Annotations

    @MethodPermissions has been renamed to @javax.annotation.security.RolesAllowed

     

    @Unchecked to @javax.annotation.security.PermitAll

     

    @Exclude to @javax.annotation.security.DenyAll

     

    @RunAs has also been moved to the javax.annotation.security package