[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3030) Don't be so hostile to alternate JPA providers when attempt is made to use manual flush mode

Dan Allen (JIRA) jira-events at lists.jboss.org
Sun Apr 5 01:43:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460636#action_12460636 ] 

Dan Allen commented on JBSEAM-3030:
-----------------------------------

Gavin suggested on the mailing list (http://lists.jboss.org/pipermail/seam-dev/2008-May/000282.html) that we introduce a setRenderFlushMode() on PersistenceProvider. This method would instruct the PersistenceContexts component what flush mode to use before the render response phase is entered. The default implementation would not change the flush mode (no-op), whereas the Hibernate implementation would set the flush mode to MANUAL.

If the application attempts to change the flush mode, for instance as a result of using @Begin(flushMode = MANUAL) then a warning would be issued since Seam cannot perform the request the application is requesting.

> Don't be so hostile to alternate JPA providers when attempt is made to use manual flush mode
> --------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3030
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3030
>             Project: Seam
>          Issue Type: Bug
>          Components: Platform interoperability
>    Affects Versions: 2.0.2.GA, 2.0.3.CR1, 2.1.0.A1, 2.1.1.GA
>            Reporter: Dan Allen
>            Assignee: Dan Allen
>             Fix For: 2.0.3.CR2, 2.1.2.CR1, The future
>
>         Attachments: JBSEAM-3030-branch20-v1.txt, JBSEAM-3030-trunk-v1.txt, NonHibernatePersistenceProvider.java
>
>   Original Estimate: 5 minutes
>  Remaining Estimate: 5 minutes
>
> Right now, alternate JPA providers (such as TopLink) are *unusable* in Seam. This is because, prior to the render response phase, Seam attempts to put the touched persistence contexts into manual flush mode. This trickles down to a call to setManualFlushMode() on the component returned by PersistenceProvider.instance(). The generic implementation (PersistenceProvider) throws an exception when this method is called.
> Throwing an exception here is overkill and hostile. I propose a log warning message, which would allow the developer to tune the log settings to hush it, or if they really don't like the log message, they can provide their own implementation. But at least the damn thing will be usable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list