Products | Versions |
---|---|
TIBCO Enterprise Message Service | - |
Not Applicable | - |
Resolution:
Description:
= = = = = = =
Clarification on the return of TIBEMS_SECURITY_EXCEPTION during tibemsSession_Commit()
Environment:
= = = = = = =
ALL
Resolution:
= = = = = =
When a non-transacted session is being used for communication, the JMSSecurityException is thrown during the send call when passing a destination object.
When a message producer is created by passing "NULL" as the destination, the security checking is not done when creating the producer, instead, the security check occurs at the time of the send call which is why the exception is thrown at this time.
In the case where a valid destination object is used while when creating a producer, the exception is thrown at the time of the producer create call as it the call is able to check the permission on the destination.
In the case of a transacted session, the transaction messages are not actually processed until the commit call is made, which is why it is expected that we only can see the failure at the time of the commit call, not during the send call.
This means if a producer is created by specifying the destination, we would see the "JMSSecurityException: Not permitted" message at the producer creation call itself as in the non transacted session.
If the destination is not specified during the producer create call, it will be thrown during the commit call, not during the send call. For performance reasons, the send calls within a transaction never wait for a reply from the server because they will receive the reply from the commit call. Therefore, this permission check is done during commit phase.