1 Reply Latest reply on Sep 24, 2004 9:44 AM by Dmitry Mozheyko

    Deploying CMP Beans in JBoss 4.0

    Corby Page Newbie

      I am attempting to upgrade an app from JBoss 3.2.5 to JBoss 4.0. I have two CMP jars which use a Firebird datasource. The start of both jbosscmp-jdbc.xml files look like this:

      <defaults>
       <datasource>java:/BigDealDS</datasource>
       <datasource-mapping>Firebird</datasource-mapping>
       <create-table>true</create-table>
       <remove-table>true</remove-table>
       <pk-constraint>true</pk-constraint>
       <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
       </defaults>
      


      I am validating against the 4.0 dtd so I feel comfortable that the schema is still correct.

      But when I deploy my beans, it ignores the java:/BigDealDS datasource and will only deploy my beans against java:/DefaultDS. There are no log messages that point to the source of the issue.

      I set up my Firebird pool using the new firebird-ds.xml template that ships with 4.0. I noticed that one of the MBeans created by this pool was:

      name=BigDealDS,service=ConnectionFactoryBinding (implemented by ConnectionFactoryBindingService)

      On the other hand, the HSQL data pool creates a different MBean called:

      name=DefaultDS,service=DataSourceBinding (implemented by WrapperDataSourceService)

      Is the CMP deployer ignoring BigDealDS because it doesn't like the MBean configuration for the connection pool?

      Thanks,
      Corby



        • 1. Re: Deploying CMP Beans in JBoss 4.0
          Dmitry Mozheyko Novice

          You must:
          1) put firebirdsql.rar into deploy directory
          2) put into deploy directory this(modified because the file from installation is wrong !)file:

          <?xml version="1.0" encoding="UTF-8"?>
          
           <!-- ==================================================================== -->
           <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
           <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
           <!-- ==================================================================== -->
          
          <connection-factories>
          
           <tx-connection-factory>
          
           <jndi-name>FirebirdDS</jndi-name>
          
           <xa-transaction/>
          
           <adapter-display-name>Firebird Database Connector</adapter-display-name>
          
           <rar-name>firebirdsql.rar</rar-name>
          
           <connection-definition>javax.sql.DataSource</connection-definition>
          
           <config-property name="Database" type="java.lang.String">localhost/3050:/opt/firebird/bases/base.gdb</config-property>
          
           <user-name>jboss</user-name>
          
           <password>:-):-):-)</password>
          
           <config-property name="Encoding">UNICODE_FSS</config-property>
          
           <!--additional properties. only use one way of setting tx isolation, please
           <config-property name="TransactionIsolation"></config-property>
           <config-property name="TransactionIsolationName">TRANSACTION_READ_COMMITTED</config-property>
           <config-property name="BlobBufferLength"></config-property>
           -->
          
           <min-pool-size>0</min-pool-size>
           <!-- sql to call when connection is created
           <new-connection-sql>some arbitrary sql</new-connection-sql>
           -->
          
           <!-- sql to call on an existing pooled connection when it is obtained from pool
           <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
           -->
          
           </tx-connection-factory>
          
          </connection-factories>
          



          After those steps my JBOSS-4.0 & Firebird are works.