components.xml:
<transaction:ejb-transaction/>
EjbTransaction.java:
/** * Dummy component that lets us install the * EjbSynchronizations via the tag * transaction:ejb-transaction * * @see EjbSynchronizations * @author Gavin King * */ @Name("org.jboss.seam.transaction.ejbTransaction") @Scope(ScopeType.STATELESS) @Install(precedence=BUILT_IN, value=false) @BypassInterceptors public class EjbTransaction {}
EjbSynchronizations.java:
/** * Receives JTA transaction completion notifications from * the EJB container, and passes them on to the registered * Synchronizations. This implementation * is fully aware of container managed transactions and is * able to register Synchronizations for the container * transaction. * * @author Gavin King * */ @Stateful @Name("org.jboss.seam.transaction.synchronizations") @Scope(ScopeType.EVENT) @Install(precedence=FRAMEWORK, dependencies="org.jboss.seam.transaction.ejbTransaction") @BypassInterceptors @TransactionAttribute(TransactionAttributeType.SUPPORTS) public class EjbSynchronizations implements LocalEjbSynchronizations, SessionSynchronization{...}
Somebody plz explain how this exactly works in terms of install/init, etc. and exactly what the purpose of EjbSynchronizations is (also what if you're using BMT?).
Both have @Install annotations, one is higher precedence that the other (BUILT_IN = 0, FRAMEWORK = 10).
So when Seam reads <transaction:ejb-transaction/> in components.xml what happens?
I'm assuming that the init routine which scans for all Seam components looking for @Name runs during deployment of EAR/WAR first and then the components.xml contents are parsed. Is this correct?