0 Replies Latest reply on Oct 25, 2002 6:40 AM by Olaf Krieger

    Getting DataSource instead ConnectionFactory

    Olaf Krieger Newbie

      I try to deploy our CICS connector and everything seems to work fine. But when I lookup the InitalContext for the Connection Factory I always get an object of type "org.jboss.resource.adapter.jdbc.local.LocalDataSource"? What do I wrong? Any help woul be apreciated.

      I am using JBoss 3.0.3

      The stacktrace:
      ---------------
      11:20:59,416 INFO [MainDeployer] Starting deployment of package: file:/C:/JBoss/jboss-3.0.3/server/default/deploy/cics_connector.rar
      11:20:59,496 INFO [RARMetaData] Loading COMPORSYS Connector for IBM CICS/TXSeries
      11:20:59,606 WARN [ServiceController] jboss.jca:service=RARDeployment,name=COMPORSYS Connector for IBM CICS/TXSeries does not implement any Service methods
      11:20:59,616 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=CICSAdapter does not implement any Service methods
      11:20:59,626 INFO [LocalTxConnectionManager] Creating
      11:20:59,666 INFO [LocalTxConnectionManager] Created
      11:20:59,716 INFO [LocalTxConnectionManager] Starting
      11:20:59,746 INFO [JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@2fae4a
      11:20:59,766 INFO [JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@5b9852
      11:20:59,776 INFO [JaasSecurityManagerService] Added CICSRealm, org.jboss.security.plugins.SecurityDomainContext@6d5459 to map
      11:20:59,907 INFO [eis/cics] Bound connection factory for resource adapter 'COMPORSYS Connector for IBM CICS/TXSeries' to JNDI name 'java:/eis/cics'
      11:20:59,917 INFO [LocalTxConnectionManager] Started
      11:20:59,927 INFO [MainDeployer] Deployed package: file:/C:/JBoss/jboss-3.0.3/server/default/deploy/cics_connector.rar
      ....
      11:26:57,661 INFO [STDOUT] lookup: java:comp/env/eis/cics
      11:26:57,671 INFO [STDOUT] using UCI ConnectionFactory
      11:26:57,691 ERROR [LogInterceptor] RuntimeException:
      java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.local.LocalDataSource
      at examples.eci.EciEJB.execute(Unknown Source)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:712)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:381)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      at sun.rmi.transport.Transport$1.run(Transport.java:142)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
      at java.lang.Thread.run(Thread.java:484)

      The cics-service.xml
      --------------------
      <?xml version="1.0" encoding="UTF-8"?>



      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <!--more hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=COMPORSYS Connector for IBM CICS/TXSeries


      <config-property name="ServerName" type="java.lang.String">CICS</config-property>
      <config-property name="ConnectionURL" type="java.lang.String">tcp://comporsys.portundlammers.de/</config-property>
      <config-property name="AutoCommitMode" type="java.lang.Boolean">false</config-property>
      <config-property name="CCISupport" type="java.lang.Boolean">true</config-property>
      <config-property name="ESISupport" type="java.lang.Boolean">false</config-property>
      <config-property name="Compression" type="java.lang.Integer">0</config-property>
      <config-property name="TimeoutSecs" type="java.lang.Integer">0</config-property>
      <config-property name="LogLevel" type="java.lang.String">DEBUG</config-property>
      <config-property name="MessageBundleBase" type="java.lang.String">COMPORSYS_CICS_1_0</config-property>
      <config-property name="LogConfigFile" type="java.lang.String">COMPORSYS_CICS_1_0.xml</config-property>
      <config-property name="RootLogContext" type="java.lang.String">COMPORSYS_CICS_1_0</config-property>


      eis/cics



      <depends optional-attribute-name="ManagedConnectionPool">


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <!--comment out this line if you want component managed security or want
      to use the default values in the ManagedConnectionFactoryProperties -->
      CICSRealm

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager