3 Replies Latest reply on Oct 12, 2006 5:35 AM by knotwithvenki

    jndi look up for a web application

    knotwithvenki

      Hi,

      Iam developing one web application in springs using jboss4.0.2 as application server.

      In that i have to use jndi name of database configuration.

      Iam using EnterpriseDB(open source rdbms) database.

      So i built one xml file enterprise-ds.xml and placed in default/deploy folder.

      enterprise-ds.xml
      ----------------------

      <?xml version="1.0" encoding="UTF-8"?>


      <local-tx-datasource>
      <jndi-name>EDBServer</jndi-name>
      <connection-url>jdbc:edb://localhost:5444/edb</connection-url>
      <driver-class>com.edb.Driver</driver-class>
      <user-name>test</user-name>
      test
      <!-- 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>
      -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      </local-tx-datasource>




      Iam calling this in my springs application with jndi name "java:comp/env/EDBServer"

      But it is giving problems.

      Do i need to make any other configurations in web.xml and other files?.

      I have seen in one of the post jboss-web.xml is also to be modified. Where exactly this file is?. There are many files with this name.

      Any help regarding this is appreciated.

      Thanks,
      yvk