This content has been marked as final. Show 2 replies
1. Which connection factory to use so that JMS uses Container transaction? Currently we are using /ConnectionFactory
2. Do we need to open connection every time we send a message or we can have a connection object initialized in post construct of Session bean. Currently we create it at post construct of session EJB
From a JMS point of view, the connection object is thread safe. It should therefore be safe to put it to an instance variable of your EJB
3. Do we need to create session every time we send a message or we can have a session object initialized in post construct of Session bean. Currently we create it every time.
There is a correlation between session and transcation, furthermore the session object has not be thread-safe. So, you should create it for every transaction.
Thank you very much Frank for your response.
We want to know if using java:JmsXA won't affect the performance or what would be the performance impact if we use this factory.