Tips on WebSphere

Articles on WebSphere

Characteristics of WebSphere

Transaction timeout of JTS doesn't throws any exception.
  • JTS throws no exception when transaction timeout occurs and so, the transaction would not roll-backed only with transaction timeout. The method timeout or something else should notify the container to roll-back the transaction.
  • This is explicitly documented with WebSphere 5.1, but 7.0 seems to have same feature.
  • http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/topic/com.ibm.support.was40.doc/html/Java_Transaction_Service__JTS_/swg21207635.html
  • JBoss 4.2 has the same behavior with it's default JTA (com.arjuna.ats.jbossatx.jta.TransactionManagerService) in the default config. I can't find any plausible parameter to change the behavior. (Is there anyone who knows whether it is the specified behavior for transaction timeout in JTA or JTS specification.)
The container throws org.omg.CORBA.TRANSACTION_ROLLBACK exception which can't nest the cause to itself.
  • When the unchecked exception is thrown in enterprise bean, the container intercepts it and throw TRANSACTION_ROLLBACK exception to remote client. The TRANSACTION_ROLLBACK can't nest the cause exception, so, the client can't trace the whole stack of the exception.
  • This would be critical to architectures of which the front layer draws all the exceptions and handle them, because the real exception can't be delivered to front layer.
  • This is explicitly documented with WebSphere 5.1, but 7.0 seems to have same feature.
  • http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/topic/com.ibm.support.was40.doc/html/WebSphere_Application_Server/swg21110173.html
  • The above problem can be solved by explicitly specifying JDBC level statement timeout.
    In case of using iBATIS, you can specify the sql-map client scope value using defaultStatementTimeout attribute of setting element in sqlmap-config.xml file, or statement scope value using timeout attribute of select, update, delete or insert element of each sql map file. If you are not using iBATIS or something like it, I think you may specify global value using JDBC driver specific parameter.
The container starts loading apache commons-logging configured to JDK logging.
The container wrapping run-time exception from the local enterprise bean into UnknownLocalException which is a subclass of EJBException.

Naming Service

Startup Beans

With startup beans of WebSphere, you can make some specific logic would be executed in the startup time or stop time. You can use startup beans at application level or module level.


Post a Comment