2 Replies Latest reply on Nov 28, 2003 7:52 PM by danb99

    Switching Datasource

    danb99 Newbie

      I have created my first CMP EJB in JBoss IDE but it is using the default Hypersonic datasource. I have created a new datasource for MySQL which I want the CMP bean to use. How do I indicate that the bean should use the MYSQL datasource defined in mysql-ds.xml instead of the Hypersonic datasource defined in hsqldb-ds.xml. Thanks!!

        • 1. Re: Switching Datasource
          danb99 Newbie

          Dan, haven't you ever heard of XDoclet? Try adding a tag like this to your bean:
          * @jboss.persistence datasource = "MySqlDS"

          That should take care of your problem.

          • 2. Re: Switching Datasource
            danb99 Newbie

            Dan, thanks for the suggestion. That sounded like a good idea. But after adding that tag my CMP entity bean is still using the Hypersonic data source. The MySQL datasource is OK - I can look it up and use it via JNDI, but I cannot get my CMP bean to use the MySql datasource instead of the Hypersonic one. Any further suggestions?