1 Reply Latest reply on Feb 27, 2004 8:01 AM by murthytvsn

    Difference between DataSource and XADataSource

    nadaya

      Hello excused my ignorance but that difference there is between a DataSource and a XADataSource....or in general between that start with XA and another than dont start with XA ....
      Thanks for all

        • 1. please help me out!!! connection error
          murthytvsn

          I am using MSSQL Server and Jboss 3.2.3.
          The problem is when I try to connect to the database, I get the following error message.

          This is part of the error message on the console.
          ==================================
          10:03:42,702 ERROR [NascoReporting] SQL Exception in com.nascopgh.reporting.ejb.ReportingSpreadSheetBean
          java.sql.SQLException: Connection handle has been closed and is unusable at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(Wrapped Connection.java:772) at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:137)
          ==================================

          [mssql-ds.xml]
          ----------------------------

          <local-tx-datasource>
          <jndi-name>genesisDS</jndi-name>
          <connection-url>jdbc:microsoft:sqlserver://dbdev1:1433;Development=Development</connection-url>
          <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
          <user-name>DevUser</user-name>
          devuser
          </local-tx-datasource>


          [jboss.xml]
          ----------------

          <ejb-name>ReportingSpreadSheetBean</ejb-name>
          <jndi-name>reporting</jndi-name>
          <resource-ref>
          <res-ref-name>genesisDS</res-ref-name>
          <jndi-name>java:/genesisDS</jndi-name>
          </resource-ref>
          <method-attributes>
          </method-attributes>


          [ejb-jar.xml]
          <resource-ref><res-ref-name>genesisDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
          <res-sharing-scope>Unshareable</res-sharing-scope>
          </resource-ref>


          [source code]
          ctx = new InitialContext ( );
          ds = ( DataSource ) ctx.lookup( "java:/genesisDS" );
          conn = ds.getConnection ( );


          please help me out.
          Byoung