[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-4278) @Create methods on @Startup components are called in a transaction which doesn't get committed

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Sun Jun 28 07:15:56 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-4278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanne Grinovero updated JBSEAM-4278:
------------------------------------

    Description: 
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.

  was:
Having a component annotated with @Scope(ScopeType.APPLICATION) and @Startup having a @Create method to do something at application startup
is called correctly but the transaction is never committed.

The transaction is 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.



I understood at first that the transaction was created but then not committed, I was wrong: the transaction is not created at all.
I've updated the issue description.

> @Create methods on @Startup components are called in a transaction which doesn't get committed
> ----------------------------------------------------------------------------------------------
>
>                 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