How to inject a Datasource in your Enterprise applications
To inject a Datasource in your Enterprise applications you can use the javax.annotation.Resource annotation to declare a reference to that resource. The @Resource can decorate a class, a field, or a method. The container will inject the resource referred to by @Resource into the component either at runtime or after its initialization. In the following … Read more