jdbc « Resource « JSP-Servlet Q&A





1. Where to store a DataSource resource in a Java web app?    stackoverflow.com

This is a rookie question. What's the best place to put

@Resource
private DataSource ds;
in a web application? Do I put it in a servlet, context listener or maybe there's a better place ...

2. Initializing Memcached/JDBC Resources for a JAX-RS servlet    stackoverflow.com

I have a service where I want to maintain data persistence in a mysql db using jdbc. While i have experience building jdbc apps and jax-rs apps in isolation, I've never ...