Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * PLM: This is version 3 of the Resources class (see notes above).
- *
- * PLM: V3 shows how we can override a default at any point, without needing to
- * define the intermediate producers.
- * PLM Here we change the convention that sessions are auto-acknowledge for all
- * types of JMS resource injection annotated with @Foo
- */
- public class Resources {
- @Produces @Foo
- @Resource(lookup = "jms/connFactory")
- ConnectionFactory connFact;
- @Produces @Foo
- public Session createSession(@Foo Connection c) {
- return c.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
- }
- }
Add Comment
Please, Sign In to add comment