Last active
May 7, 2016 08:07
-
-
Save nobodyiam/e9d995593087f7bd59a96a01c32d198a 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
@RestController | |
@RequestMapping("/notifications") | |
public class NotificationControllerSample implements MessageListener { | |
@Autowired | |
private EntityManagerUtil entityManagerUtil; | |
private List<String> findWatchedKeys(String applicationId, String namespace, | |
String dataCenter) { | |
List<String> watchedKeys = Lists.newArrayList(); | |
//do more logic, may need to load from db in some cases | |
/** | |
* Manually close the entity manager. | |
*/ | |
entityManagerUtil.closeEntityManager(); | |
return watchedKeys; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment