I've got a design issue.
Should I make
JDBC calls on the MDBs or 'outsourced' it to a Stateless Session Beans?
You see, the code has
public void ejbCreate() throws CreateException {
try {
InitialContext ic = new InitialContext();
dataSource = (DataSource) ic.lookup(JNDI_DATASOURCE);
ic.close();
And the onMessage has got JDBC calls and closing the connection once done, etc.
QUESTION: Is it going to be inefficient to have such JDBC stuff for a MDBs that listens to hundreds of messages from a given Queue?
What's your recommendation....to have them passed on to a pool of stateless beans to handle to JDBCs?
Thank you.