[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-4278) @Create methods on @Startup components are called without a transaction
Norman Richards (JIRA)
jira-events at lists.jboss.org
Mon Jul 6 16:12:51 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norman Richards closed JBSEAM-4278.
-----------------------------------
Resolution: Rejected
There's no expectation that a TX would exist in that context. In the example app, we need to add @Transactional to the method to cause the TX to be started.
> @Create methods on @Startup components are called without a transaction
> -----------------------------------------------------------------------
>
> Key: JBSEAM-4278
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4278
> Project: Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.0.CR1
> Reporter: Sanne Grinovero
> Fix For: 2.2.0.GA
>
>
> Having a component annotated with @Scope(ScopeType.APPLICATION) and @Startup having a @Create method to do something at application startup is called correctly but there is no transaction around the method. (i.e. changes done trough an EntityManager are never applied)
> The transaction is created and committed if the component is a Stateful EJB, but in this case @In injection is not working.
> This breaks for example the Blog example's test as it rebuilds the initial Lucene index using this method.
--
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