[ 
https://jira.nuxeo.com/browse/NXP-7170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stéphane Lacoin updated NXP-7170:
---------------------------------

    Upgrade notes: 
When application is invoking a core session without a transaction active, the 
system is warning you with the following message :

"Session invoked in a container without a transaction active"

If the warn occurs in the processing of a web request, that means that you've 
forgot to configure the request controller for injecting the transactional 
context. Looks at the following snip-set that show you how contributing to the 
request controller for this.

{code}
      <extension 
target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService"
                point="filterConfig">

        <filterConfig name="MyFilterConfig"  transactional="true">
      <pattern>${org.nuxeo.ecm.contextPath}/<my-pattern></pattern>
    </filterConfig>
  </extension>
{code}


In the other cases, you should manager yourself the transaction demarcation in 
your own code. Here is a snip-set that can help you for doing this job.

{code}
                TransactionHelper.startTransaction();
                try {
                        .... 
                } catch (Throwable e) {
                        TransactionHelper.setTransactionRollbackOnly();
                } finally {
                        TransactionHelper.commitOrRollbackTransaction();
                }
{code}

> don't allow method invokes on core session without a transaction
> ----------------------------------------------------------------
>
>                 Key: NXP-7170
>                 URL: https://jira.nuxeo.com/browse/NXP-7170
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>    Affects Versions: 5.4.2
>            Reporter: Stéphane Lacoin
>            Assignee: Stéphane Lacoin
>            Priority: Major
>             Fix For: 5.4.3
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> In tomcat, at this time, we allow the use of the session without a 
> transaction activation active. We suspect this being the root cause 
> of another problems such as SQL server locked on a single transaction.
> We're going to forbid that kind of access by detecting the condition and 
> throwing a runtime exception in the 
> org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to