Created
July 3, 2014 10:34
-
-
Save masazdream/8b1504fb8cae9b59e10e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Path("/communication") | |
| public class HelloSCRYServer { | |
| @GET | |
| @Produces(MediaType.TEXT_PLAIN) | |
| public String sayHello() { | |
| String result = null; | |
| LocalTransaction tx = AppConfig.getLocalTransaction(); | |
| try { | |
| tx.begin(); | |
| MCategoryDao dao = new MCategoryDaoImpl(); | |
| MCategory mcategory = dao.selectById(1); | |
| result = mcategory.getCategoryCode(); | |
| tx.commit(); | |
| } finally { | |
| // トランザクション | |
| tx.rollback(); | |
| } | |
| return result; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment