|
|
|
@ -731,16 +731,16 @@ TR: OK AS IS. images don't show up in the editor, but they do show up in the gen |
|
|
|
<title>Example of declarative transaction implementation</title> |
|
|
|
<title>Example of declarative transaction implementation</title> |
|
|
|
|
|
|
|
|
|
|
|
<para>Consider the following interface, and its attendant |
|
|
|
<para>Consider the following interface, and its attendant |
|
|
|
implementation. This example uses the rote <classname>Foo</classname> |
|
|
|
implementation. This example uses <classname>Foo</classname> and |
|
|
|
and <classname>Bar</classname> tropes so that you can concentrate on the |
|
|
|
<classname>Bar</classname> classes as placeholders so that you can |
|
|
|
transaction usage without focusing on the domain model. For the purposes |
|
|
|
concentrate on the transaction usage without focusing on a particular |
|
|
|
of this example, the fact that the |
|
|
|
domain model. For the purposes of this example, the fact that the |
|
|
|
<classname>DefaultFooService</classname> class throws |
|
|
|
<classname>DefaultFooService</classname> class throws |
|
|
|
<exceptionname>UnsupportedOperationException</exceptionname> instances |
|
|
|
<exceptionname>UnsupportedOperationException</exceptionname> instances |
|
|
|
in the body of each implemented method is good; it allows you to see |
|
|
|
in the body of each implemented method is good; it allows you to see |
|
|
|
transactions created and then rolled back in response to the |
|
|
|
transactions created and then rolled back in response to the |
|
|
|
<exceptionname>UnsupportedOperationException</exceptionname> |
|
|
|
<exceptionname>UnsupportedOperationException</exceptionname> instance. |
|
|
|
instance.</para> |
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
<programlisting language="java"><lineannotation>// the service interface that we want to make transactional</lineannotation> |
|
|
|
<programlisting language="java"><lineannotation>// the service interface that we want to make transactional</lineannotation> |
|
|
|
|
|
|
|
|
|
|
|
|