[
http://jira.jboss.com/jira/browse/JBSEAM-992?page=comments#action_12367597 ]
Michael Youngstrom commented on JBSEAM-992:
-------------------------------------------
There is zero technical reason to configure an EMF in Spring and then
use this combination in some
Seam application.
One advantage might be the ability to use a thirdparty JTA transaction manager since
Spring configured EMFs support injections of a datasource.
Another reason might be configuration. Many legacy spring apps use spring based
configuration techniques configure the properties of an EMF which may be more flexible at
times than depending upon the configuration properties hard coded in a persistence.xml.
Using a spring configured EMF with spring transactions can provide some powerful
functionality such as: transaction suspension support for propagation rules like
REQURIES_NEW and NOT_SUPPORTED as well as support for things like nested transactions.
Spring configured EMFs can provide quite a bit of power to spring users. And I don't
think we should stop Seam-Spring users from taking advantage of them.
Now my intention with this issue isn't necessarily to lead people down this path as a
"best practice" but more to show and test that it is possible (my work on this
so far found a bug SPR-3645). The Seam examples all walk a fine line between best
practice, showing what is possible, and regression testing. Using a spring configured EMF
in the spring example would be showing spring users that it is possible and would also aid
in regression testing.
Or, even worse, wrap JDBC transactions with a JTA resource manager,
then wrap the transaction with
Spring interceptors, then wrap the Spring interceptors with Seam components.
I'm not exactly sure what you are referring to here.
Use Spring configured EntityManagerFactory in spring example
------------------------------------------------------------
Key: JBSEAM-992
URL:
http://jira.jboss.com/jira/browse/JBSEAM-992
Project: JBoss Seam
Issue Type: Feature Request
Components: Spring
Affects Versions: 1.2.0.GA
Reporter: Michael Youngstrom
Assigned To: Michael Youngstrom
Fix For: 2.0.0.GA
Since most Spring project will be using a Spring configured EntityManagerFactory we
should use one in the Spring example as well and inject this EntityManagerFactory into the
Seam Managed PersistenceContext component with an expression.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira