FYI some more minor code issues I noticed in SM2.0.2. I added this as
SM-220.
Regrds,
Peter.
#1 ExchangePacket - typo
* @return the proerty from the exchange
=====
#2 MessageExhangeImpl - typo
* @return the proerty from the exchange
=====
#3 JBIContainer - typo
* light weight initialization - default values for mbeanSErver,
TransactionManager etc are null
=====
#4 JCAFlow - method modifier
public TransactionManager getTransactionManager() {
why is this method public?
=====
#5 ManagementContext - member default value
private String jndiPath = "/jmxconnector";
Isn't this value unconditionally overwritten every time during init?
=====
#6 SedaFlow - Use of JTA_TRANSACTION_NAME
In doSend instead of:
if (me.getProperty(MessageExchange.JTA_TRANSACTION_PROPERTY_NAME) ==
null &&...
could say:
if (!me.isTransacted() &&...
=====
#7 JBIContainer - getTransactionManager
I think the 2nd JNDI lookup attempt is logging the wrong message if it
fails.
log.debug("No transaction manager found from naming context", e);
Shouldn't that be:
log.debug("No transaction manager found from naming context", e1);
// Note: e1 instead of e
======
#8 MessageExchangeImpl - setMessage
Seems inefficient checking of name. (eg if IN.equals(name) is true no
need to keep testing name)
if (IN.equals(name) && !can(CAN_SET_IN_MSG)) {
throw new MessagingException("In not supported");
}
if (OUT.equals(name) && !can(CAN_SET_OUT_MSG)) {
throw new MessagingException("Out not supported");
}
if (FAULT.equals(name) && !can(CAN_SET_FAULT_MSG)) {
throw new MessagingException("Fault not supported");
}
if (FAULT.equals(name) && !(message instanceof Fault)) {
throw new MessagingException("Setting fault, but message is
not a fault");
}
[END]