Getting the connection at session creation time with IMMEDIATE, would mean that the extended persistence contexts that we create for stateful session beans, will be created at EJB @PostConstruct time (when the SFSB is instantiated). I think that obtaining the database connection when a stateful session bean is created (before the JTA transaction has started possibly), could result in getting a connection that is not used.
|