[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1144) Make org.jboss.seam.util.Transactions a seam component

Michael Youngstrom (JIRA) jira-events at lists.jboss.org
Thu Apr 12 12:01:01 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1144?page=comments#action_12359137 ] 
            
Michael Youngstrom commented on JBSEAM-1144:
--------------------------------------------

Ok, so you do not disagree (don't necessarily agree either which is fine) about exposing a transaction service as a component which is fine.  So we can curb that side of the discussion for a little while.

On to the other side of the issue.  Just for the sake of discussion let's assume Gavin agrees that exposing transactions as a Seam component is a fine idea.  The biggest problem I have with the way JTA is currently being used in Seam is it's reliance on JNDI.  Any JTA implementation that a seam app wishes to use must be integrated into the current platform's JNDI provider or the app must provide an embedded JNDI provider.  As you are probably well aware JNDI isn't the most extensible or embeddable platform to work with regards to having multiple jndi providers available in the same environment, etc.

So, assuming we have a Transaction Service component why not allow the person configuring this component so not only specify a UserTransactionName but also allow them to optionally specify a UserTransaction expression instead.  Similar to what we do with the managedPersistenceContext components.  We don't provide any other implementations of the Transaction Service Component and by allowing an expression to expose a UserTransaction I think we have taken a big step towards removing dependency on JNDI for use of JTA in Seam.  If someone is inventive enough to create their own UserTransaction implementation let them be.  At least now they won't have to create an embedded jndi provider and the baggage that comes with JNDI.  We would still have datasources obtained through jndi but I think people can figure out ways to get around that if they need to.

How would something like that sound?

Mike

> Make org.jboss.seam.util.Transactions a seam component
> ------------------------------------------------------
>
>                 Key: JBSEAM-1144
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1144
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 1.2.1.GA
>            Reporter: Michael Youngstrom
>             Fix For: 1.3.0.BETA1
>
>         Attachments: seam-tx-2.zip, seam-tx.patch
>
>
> I know this is probably a loaded issue but please hear me out. :)  It would be nice if org.jboss.seam.util.Transactions was replaced with a Seam Component just like everything else in Seam.  This would allow for pluggable Transaction Management providers and pave the way for support for Spring Managed Transactions, JPA Local Transactions, and true Hibernate Local Transactions.  This will allow Seam applications to run without a dependency on microcontainer in tomcat and allow for tighter Framework integration with spring and others.
> I would personally be more than willing to do the work of making the an initial JTATransaction component(s) as a replacement for org.jboss.seam.util.Transactions and would also create a SpringTransaction component as a proof of concept for extending the Transaction component.
> One problem I can see off hand is we may have to interact with a transaction in some places where a Seam ApplicationContext is not available.  However, I wonder if confining Seam transactions to a seam call might help simplify matters anyway?  For example transaction cleanup could take place in the @Destroy of the transaction component instead of in the ExceptionFilter?
> Also, this wouldn't be looked at as a JTA replacement but rather a service abstraction.  Just like any other java webapp if you're using enterprise services such as EJBs or JCA JTA would be required.  if you're running on tomcat or some other simple web container a resource local transaction manager (Spring's abstraction, JPA's, or Hibernate's) can be used.
> I'm sure there are tons of other problems I'm not looking at but worst case scenario this issue would be a great place to document them and to refer rejected feature requests. (for example JBSEAM-1118)
> What do you think?
> Mike

-- 
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

        



More information about the seam-issues mailing list