5 Replies Latest reply on May 25, 2006 11:29 AM by Ovidiu Feodorov

    Messaging Tests: How to deploy your own DS?

    mskonda Apprentice

      I have a situation where I have to use Sybase as my persistence in place of HSQL. I modified the configutations accordingly in container.xml to reflect the sybase database configuration

      <database-configuration name="sybase">

      I created sybase-ds.xml file in jms/src/etc/server/default/deploy (I expected this file to be deployed and create a DS with SybaseDS as the jndi-name)

      Changed the value of functional.tests.database in build.xml to sybase (see the name attribute of the database-configuration above) and added
      <!-- Sybase JDBC driver -->
      <path location="../src/resources/jconn3.jar"/>

      to the library.classpath id.

      When I run the tests, it complains it couldn't find SybaseDS jndi name.

      Any ideas/pointers?


        • 1. Re: Messaging Tests: How to deploy your own DS?
          Tim Fox Master

          I am unsure what you are trying to do.

          Are you trying to run the test suite against a sybase database, or use a sybase datasource in a deployed jboss messaging installation?

          • 2. Re: Messaging Tests: How to deploy your own DS?
            mskonda Apprentice

            trying to run testsuite against sybase database

            • 4. Re: Messaging Tests: How to deploy your own DS?
              mskonda Apprentice

              Tim, there is one thing that's not clear to me -

              in *-persistence-service.xml file, there's a reference to Datasource attribute as shown below(example from sybase-persistence):

              <mbean code="org.jboss.messaging.core.plugin.JDBCPersistenceManager"
               <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
               <depends optional-attribute-name="ChannelMapper">jboss.messaging:service=ChannelMapper</depends>
               <attribute name="DataSource">java:/DefaultDS</attribute>

              <mbean code="org.jboss.jms.server.plugin.JDBCChannelMapper"
               <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
               <attribute name="DataSource">java:/DefaultDS</attribute>

              First thing, there's no (or I couldn't find) *ds.xml that deploys DefaultDS so not sure where is it picking it from

              In my case, I have deployed a sybase-ds.xml which deploys a DS with SybaseDS jndi name. Hence I changed the above datasource names to SybaseDS instead of DefaultDS to reflect the change.

              However, when I run the tests, it complains the NameNotFoundException (for SybaseDS).

              • 5. Re: Messaging Tests: How to deploy your own DS?
                Ovidiu Feodorov Master

                The minimalistic ServiceContainer we use for testing deploys only one data source under java:/DefaultDS, and that datasource corresponds to the database configuration you specify in tests/etc/container.xml. So, if you add your sybase configuration in tests/etc/container.xml and configure the database to use as follows


                in the same container.xml, you should be fine.

                By the way, if you think that http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMessagingUnitTests needs to be improved in this respect, please feel free to do so.