To make sure my actions to proper transaction handling, I find myself repeating this code in my controllers over and over again:

```
/**
 * @Route("/complete", name = "authentication_complete")
 */
public function completeAction(Request $request)
{
    $result = null;
    try {
        $this->getManager()->beginTransaction();

        $result = $this->doCompleteAction($request);

        $this->getManager()->flush();
        $this->getManager()->commit();
    } catch (\Exception $e) {
        // @codeCoverageIgnoreStart
        $this->getManager()->rollback();
        throw $e;
        // @codeCoverageIgnoreEnd
    }

    return $result;
}

public function doCompleteAction(Request $request)
{
    // do whatever you action is suposed to do
    return $response;
}

```

I'd like to have something like `@ManageTransaction`. This would go into the comment of the action and saving me a lot of doublicated code. In a perfect world this would also handle controller forwards in a clever way.

If you know Java EE, this would be something like container managed transactions.

Is there a bundle (or an other nice solution) for this?