Announcement Announcement Module
No announcement yet.
JmsOutboundGateway: exception = JMS Session does not implement specific domain: Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JmsOutboundGateway: exception = JMS Session does not implement specific domain:


    I'm using Tibco EMS 5.1.0, Spring 3.0.5.RELEASE and spring integration 2.0.3.RELEASE

    When using the JmsOutoundGateway, after some time we received a javax.jms.IllegalStateException:
    javax.jms.IllegalStateException: JMS Session does not implement specific domain: Cached JMS Session: [email protected]

    When the exception starts happening, we could'nt use anymore the jms queue and have to reset the connection to clear the sessions in the cache.
    The exception happens "randomly" after some time, could be one hour or one day after we start the server. I have no clue on what trigger it.
    Seems the Session proxified by the cachingFactory is not proxyfied anymore.

    Here is my configuration for the connectionFactory:

    <bean id="connectionFactory"
    		<property name="targetConnectionFactory" ref="uncachedConnectionFactory" />
    		<property name="sessionCacheSize" value="10" />
    		<property name="cacheProducers" value="false" />
    		<!--cacheConsumers=true induce leaks on consumers in reply/request mode (gateway) -->
    		<property name="cacheConsumers" value="false" />
    	<bean id="uncachedConnectionFactory" class="com.tibco.tibjms.TibjmsQueueConnectionFactory">
    		<property name="serverUrl" value="${jms.server.url}" />
    		<property name="userName" value="${}" />
    		<property name="userPassword" value="${jms.user.password}" />
    		<property name="SSLVendor" value="${jms.ssl.vendor}" />
    		<property name="SSLEnableVerifyHost" value="${}" />
    		<property name="SSLEnableVerifyHostName" value="${jms.ssl.enable.verify.hostname}" />
    		<property name="SSLExpectedHostName" value="${jms.ssl.expected.hostname}" />
    		<property name="SSLTrace" value="${jms.ssl.trace}" />
    		<property name="SSLCipherSuites" value="${jms.ssl.cipher.suites}" />
    and to bind the channels to the queues:

    	<channel id="reportPreviewerRequestChannel" />
    	<channel id="reportPreviewerReplyChannel" />
    	<jms:outbound-gateway request-channel="reportPreviewerRequestChannel"
    		request-destination="reportPreviewerRequestQueue" reply-channel="reportPreviewerReplyChannel"
    		reply-destination="reportPreviewerReplyQueue" receive-timeout="${report.preview.timeout}"
    		reply-timeout="${report.preview.timeout}" />
    	<gateway id="reportPreviewer" service-interface="com.project.web.server.ReportPreviewer"
    		default-reply-timeout="${report.preview.timeout}" />
    I've found a similar thread on this forum but in their case the error concern the connection and in mine it's the session. Also, there is no conclusion on this thread. No idea if their problem has been fixed or not.

    Please tell me if you need more information and if it's a problem with my config or if I should open a bug issue.

    Thanks in advance.
    Attached Files

  • #2
    Sorry to up the post, but we're still getting the error.
    This is very annoying because it happens on our production environment.

    Do you need me to provide more information?

    Thanks in advance.


    • #3
      Sorry, but have you raised this issue with Tibco? The fact that the instanceof check works but then the actual instance is not of that type means that it's more of a bug on that end.

      Obviously the "fix" would be relatively simple, but the reason I hesitate is that the existing code is actually needed for other popular implementations. I might at least add a catch block to deal with this as a fallback.


      • #4

        Sorry but I didn't fully understand your answer. I still don't understand how the tibco session wrapped by the spring proxy could changed of type.

        I've launched the application in debug mode so I could track the session type.
        In the SingleConnectionFactory file, lines 534-536 while debugging:

        			Session session = getSession(, mode);
        				if (session != null) {
        					if (!method.getReturnType().isInstance(session)) {
        Here are the session.toString():
        - when working : Cached JMS Session: [email protected]
        - After few times when it fails: Cached JMS Session: [email protected]

        My current workaround is to reset the correction when the session is corrupted before the exception is thrown.

        From what I've understood from your answer:
        - It's a problem in the tibco lib.
        - You could add a catch block to handle this special case but that would impact all the users?

        Do you need me to fill a bug report on this ?




        • #5

          Again sorry to up this post, but I still don't know if I should fill a bug report in the Spring issue tracker or if you need more information ?
          I'm not sure if this is related only to tibco or not.




          • #6

            My workaround of resetting the connection as too many side effects, I need to remove it.
            How could I just clean and reset the corrupted session ?

            Also, how about to permanently fix this issue ?