Oracle WebLogic Server 12c: Advanced Administration II — Question 9
You have a multithreaded application that looks up the WebLoqic JMS ConnectionFactory object from the JNDI tree.
Which statement is correct in this scenario? (Choose the best answer.)
Answer options
- A. It is not permitted. A multithreaded application cannot access the ConnectionFactory object.
- B. The access to ConnectionFactory object MUST be synchronized.
- C. The ConnectionFactory object can be referenced in a multithreaded application without any special considerations.
- D. Multiple threads trying to use the ConnectionFactory object simultaneously will throw an exception.
- E. In a multithreaded scenario, connection objects cannot be safely created from the ConnectionFactory.
Correct answer: B
Explanation
The correct answer is B because synchronization is necessary to prevent concurrent access issues when multiple threads are trying to use the ConnectionFactory object. Option A is incorrect as multithreaded applications can access the ConnectionFactory, but they must do so with synchronization. Options C and D are also wrong because they overlook the need for synchronization and the potential for exceptions when concurrent access occurs. Option E is inaccurate since connection objects can be created, but care must be taken to synchronize access.