Go back to 1Z0-895 - Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam

Question :-

You are writing an EE component that functions as a message producer. The message producer sends message to a JMS queue. The component environment defines a resource-ref of type javax.jms.ConnectionFactory with the same jms/ConnectionFactory. Which will correctly obtain a connection factory for a queue?
Context context = new initialContext();Connectionfactory confac = (ConnectionFactory) Context.lookup("java: comp/env/jms/ConnectionFactory");
InitialContext Context = new Context () ;QueueConnectionFactory confac = (QueueConnectionFactory) context.lookup("java: comp/env/jms/Myfactory");
@Resource ("ConnectionFactory") private static QueueConnectionFactory confac;
@Resource (loopkup = "jms/QueueConnectionFactory") private static ConnectionFactoryconfac;

Want to practice for 1Z0-895 - Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam ? Click here.