[
https://issues.jboss.org/browse/SEAMPERSIST-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622059#comment-12622059
]
Stuart Douglas commented on SEAMPERSIST-65:
-------------------------------------------
That sounds like a bug in ViewScope, scopes should not be restricted to
Target(value=TYPE), they should also be allowed on methods and fields.
> Support ViewScoped for Seam Managed Persistence Context
> -------------------------------------------------------
>
> Key: SEAMPERSIST-65
> URL: https://issues.jboss.org/browse/SEAMPERSIST-65
> Project: Seam Persistence
> Issue Type: Feature Request
> Affects Versions: 3.0.0.Final
> Environment: JBoss AS7
> Reporter: Andrew Wheeler
> Labels: ViewScoped
>
> It would be nice to extend the SMPC to the view scope. When using ajax
> frameworks view scoped pages often have many action requests. On each
> invocation the bean state must be resynchronised with the persistence context
> using merge. This is a little unpleasant as:
> * It can lead to lots of checks to see if an entity is attached and if not to
> re-attach it.
> * This sometimes can cause the entity manager to flush, thus persisting
> merged entities pre-maturly.
> Currently it is not possible to do the following as the ViewScoped annotation
> is not permitted in this context:
> @ExtensionManaged
> @Produces
> @PersistenceUnit
> @ViewScoped
> EntityManagerFactory viewScopedScoped;
> Secondly, even if you could then it would probably stop conversation scoped
> pages from working. Perhaps the scope qualifier could be wrapped using an
> annotation like @PersistenceScope(ViewScoped.class). It would probably also
> require producing two entity managers and choosing the right one to inject on
> the bean using the qualifier. E.g:
> @Produces
> @PersistenceScope(ViewScoped.class)
> EntityManager viewScoped;
> @Produces
> @PersistenceScope(ConversationScoped.class)
> EntityManager conversationScoped;
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues