genericjmsra
  1. genericjmsra
  2. GENERICJMSRA-55

genericjmsra gets ClassCastException because it tries to cast always javax.jms.ConnectionFactory

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1b
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:

      Glassfish 3.1.2, Tibco EMS 6.1

      Description

      Creating connections to Tibcos javax.jms.XAConnectionFactory implementation fails because genericjmsra casts all ConnectionFactory objects to javax.jms.ConnectionFactory. But javax.jms.XAConnectionFactory does not extend javax.jms.ConnectionFactory, see https://java.net/jira/browse/JMS_SPEC-71.

      The Tibco class com.tibco.tibjms.naming.TibjmsFederatedXAConnectionFactory also implements only javax.jms.XAConnectionFactory and so a ClassCastExcpetion happens.

      Exception Stacktrace:
      com.sun.appserv.connectors.internal.api.PoolingException: com.tibco.tibjms.naming.TibjmsFederatedXAConnectionFactory cannot be cast to javax.jms.ConnectionFactory
      at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
      at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
      at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
      at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
      at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
      at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
      at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
      at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
      at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
      at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:332)
      at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
      ... 95 more
      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: com.tibco.tibjms.naming.TibjmsFederatedXAConnectionFactory cannot be cast to javax.jms.ConnectionFactory
      at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
      at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
      at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
      ... 105 more
      Caused by: java.lang.ClassCastException: com.tibco.tibjms.naming.TibjmsFederatedXAConnectionFactory cannot be cast to javax.jms.ConnectionFactory
      at com.sun.genericra.outbound.AbstractManagedConnectionFactory.initializeConnectionFactory(AbstractManagedConnectionFactory.java:182)
      at com.sun.genericra.outbound.AbstractManagedConnectionFactory.createManagedConnection(AbstractManagedConnectionFactory.java:118)
      at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:160)
      at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
      ... 107 more

      Connection Pool definition from glassfish-resources.xml
      <connector-connection-pool name="jms/XAConnectionPool" resource-adapter-name="genericra" connection-definition-name="javax.jms.ConnectionFactory" transaction-support="XATransaction">
      <property name="ConnectionFactoryJndiName" value="XAGenereic"/>
      <property name="SupportsXA" value="true"></property>
      </connector-connection-pool>

        Issue Links

          Activity

          ahe created issue -
          David Zhao made changes -
          Field Original Value New Value
          Link This issue depends on JMS_SPEC-71 [ JMS_SPEC-71 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              ahe
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: