Commit ca7d543a3c48361b177e3990c1bb2883127549f1
Exists in
master
Merge branch 'master' of git@github.com:demoiselle/framework.git
Showing
1 changed file
with
9 additions
and
8 deletions
Show diff stats
documentation/reference/pt-BR/persistencia.xml
... | ... | @@ -378,14 +378,14 @@ frameworkdemoiselle.&#8203;persistence.&#8203;<emphasis role="bold">conn2</empha |
378 | 378 | </para> |
379 | 379 | |
380 | 380 | <programlisting role="JAVA"><![CDATA[public class ClasseDAO { |
381 | - | |
381 | + | |
382 | 382 | @Inject |
383 | 383 | private Connection conn1; |
384 | - | |
384 | + | |
385 | + @Transactional | |
385 | 386 | public void metodoPersistir(){ |
386 | 387 | conn1.prepareStatement("INSERT INTO TAB_1 VALUES (1,'JDBC')").execute(); |
387 | 388 | } |
388 | - | |
389 | 389 | }]]></programlisting> |
390 | 390 | |
391 | 391 | <para> |
... | ... | @@ -394,23 +394,24 @@ frameworkdemoiselle.&#8203;persistence.&#8203;<emphasis role="bold">conn2</empha |
394 | 394 | </para> |
395 | 395 | |
396 | 396 | <programlisting role="JAVA"><![CDATA[public class ClasseDAO { |
397 | - | |
397 | + | |
398 | 398 | @Inject |
399 | 399 | @Name("conn1") |
400 | 400 | private Connection conn1; |
401 | - | |
401 | + | |
402 | 402 | @Inject |
403 | 403 | @Name("conn2") |
404 | 404 | private Connection conn2; |
405 | - | |
405 | + | |
406 | + @Transactional | |
406 | 407 | public void metodoPersistirEmConn1(){ |
407 | 408 | conn1.prepareStatement("INSERT INTO TAB_1 VALUES (1,'JDBC')").execute(); |
408 | 409 | } |
409 | - | |
410 | + | |
411 | + @Transactional | |
410 | 412 | public void metodoPersistirEmConn2(){ |
411 | 413 | conn2.prepareStatement("INSERT INTO TAB_2 VALUES (1,'JDBC')").execute(); |
412 | 414 | } |
413 | - | |
414 | 415 | }]]></programlisting> |
415 | 416 | |
416 | 417 | <caution> | ... | ... |