I need to log to the database a transaction
I could log directly to database as a 1st option.
make an MDB for logging and send to the JMS
queue whenever I need to log something.
I wonder which way is better for performance,
considering that even in JMS in I need to
open/close connection, which will take some time?
any idea or suggestion?
If u using Oracle as RDBMS then forgot the JBossMQ, use Oracle Advanced Queuing instead (remarkably faster).
Open and Close is costly, but if u have the ack for the message then the message is safe (as in an inserted record after commit) if u use persistent messaging.
I suppose JMS is for inter application communication, not for logging. E.g. log4j is a logger.