0 Replies Latest reply on May 17, 2007 4:08 PM by bilal_0003

    Need Help

    bilal_0003

      hi
      im using jboss 4.0.5 in my app with Hibernate 3.1 and actually the problem im facing is ,

      i have created a DS file for my project addressbook



      <local-tx-datasource>
      <jndi-name>PostgresqlAddressBookDS</jndi-name>
      <connection-url>jdbc:postgresql://192.168.1.11:5432/addressbook</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>postgres</user-name>
      backend
      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      <!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
      <new-connection-sql>select 1</new-connection-sql>
      -->

      <!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
      <check-valid-connection-sql>select 1</check-valid-connection-sql>
      -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)

      <type-mapping>PostgreSQL 8.2</type-mapping>
      -->
      </local-tx-datasource>






      the thing is actually i want jboss to crate sessions and bind them with JNDI
      so then i use them in my app for this i craeted a file hibernate-service.xml



      java:PostgresqlAddressBookDS
      org.hibernate.dialect.PostgreSQLDialect
      java:addressbookSessionFactory
      org.hibernate.cache.HashtableCacheProvider
      update-drop
      false





      but the problem is when i start jboss it gives arroe no DS find
      but i already give it
      both of these files are in deploy folder and the interesting thing after jboss throw exception that it did't find ny data source ,if i change my hibrenate-service file just add a space and save it it give no error and create session

      cus some tell me im doing right and wat steps i should do to configure jboss with hibernate for session handling and where to specify my *.cfg.xml file


      plz