Object grid transaction exceptions

Under normal circumstances, a production server reports errors to a client only as the last option; if everything else fails. When a solution gateway receives an event but is unable to process it for some reason or another, the server does send a transaction exception back to the client. You must control what action to take when a transaction exception is returned.

The following message shows an example transaction exception:

Exception occurred putting Event to Grid: com.ibm.websphere.objectgrid.TransactionException: rolling back transaction, see caused by exception
com.ibm.ia.common.GatewayException: com.ibm.websphere.objectgrid.TransactionException: rolling back transaction, see caused by exception
        at com.ibm.ia.gateway.impl.SolutionGatewayImpl.submitEvent(SolutionGatewayImpl.java:257)
        at com.ibm.ia.gateway.impl.SolutionGatewayImpl.submit(SolutionGatewayImpl.java:164)
        at com.ibm.ia.perf.PerfClient.I2A_Producer.sendMessage(I2A_Producer.java:128)
        at com.ibm.ia.perf.PerfClient.Producer.sendMsg(Producer.java:290)
        at com.ibm.ia.perf.PerfClient.Producer.run(Producer.java:195)
        at java.lang.Thread.run(Thread.java:853)
Caused by: com.ibm.websphere.objectgrid.TransactionException: rolling back transaction, see caused by exception

Use the SolutionGateway methods setGridTimeouts(CISGridTimeouts timeouts) and setMaxSubmitDelay(int delay) to control the time constraints on a gateway.

If you do get a transaction exception, create a new solution gateway connection and resubmit the event, or take another appropriate action.

SolutionGateway gateway = connection.getSolutionGateway("AcmeAirlines");

It is difficult to find out exactly what causes an exception. However, there are some likely scenarios: