0 Replies Latest reply on Mar 23, 2006 7:34 PM by mikode

    Writting CMP and Error of datasource bound

    mikode

      Hi everybody,

      I deploy a CMP by using Jboss Eclipse IDE and it works well (if do not condider Database). Then I want to map it with MySQL. I followed the guide to copy/change mysql-ds.xml, standardjbosscmp-jdbc.xml and standardjaws.xml, start the server, the information :
      00:19:50,342 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDS to JNDI name 'java:MySqlDS'

      is showed ane I think that it means my configuration is correct.

      At CMPTest class I wrote some code like that :
      Context ctx = new javax.naming.InitialContext(props);
      javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("java:MySqlDS");

      but has an error : MySqlDS not bound.

      PS. I try to write some SessionBeans and manually to connect with Mysql, it is OK!

      I do not know where is the problem, someone help me, please!!

      Thank you very much!.

      Lan