3 Replies Latest reply on May 29, 2003 3:33 PM by ldolling

    initial configuration - any help?

    ldolling Newbie


      problem: datasource not bound

      JBoss 3.2,x

      1) I can connect to MySQL via JDBC and JBoss directly. Tested. Works fine.
      2) Now I want to configure JBoss (default) access MySQL via JNDI and the JBoss datasource configuration.

      I get exception: "MySqlDB not bound"

      ctx = new InitialContext();
      DataSource ds = (DataSource) ctx.lookup("MySqlDB");
      conn = ds.getConnection();

      What I did:
      1) QuickStart-30x.pdf, Chapter 10
      2) copying examples\jca\mysql-ds.xml to deploy
      3) editing the attributes to my needs (see below). Tested with direct access to MySQL
      -> doesn't work
      4) figured out HyperSonice example uses a security realm (also refered to in Docu), so I
      a) added security realm to mysql-ds.xml
      b) added security realm to login-config.xml and set it to NoTxCM (see below)
      c) set standardjaws.xml and standardjbosscmp-jdbc.xml

      Still it doesn't work. Maybe someone has a general overview how to configure a datasource?

      Regards, Lars




      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal">root</module-option>
      <module-option name = "userName">root</module-option>
      <module-option name = "password"></module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=NoTxCM,name=MySqlDB</module-option>