2 Replies Latest reply on Oct 7, 2002 5:48 PM by qjereq

    Template Table (TestEntity) not Being Created

    qjereq

      I am using:
      jboss-3.0.3_tomcat-4.1.12
      Win 2K
      Jdk 1.4
      MS SQL Server 2k
      MS JDBC Drivers (most current)

      I was successful in deploying the Template EJBs to the default datasource (Hypersonic). The test client ran fine on this DB too. Unfortunately, I have been unsuccessful in deploying the template to an MS SQL datasource. I have modified all references in the Template source to point to the MS SQL datasource and have been able to deploy it, sort of. The log says that the ejb has deployed and that the 'TestEntity' table was created successfully, but the table does not exist on the database.

      I know that the MS SQL Datasource works because I am able to connect to the database through the datasource using a JSP. I can also (really) create a table through the datasource, BUT only if I call connection.commit() afterwards. Also, the Template test client does not work with the MS SQL Datasource. The server and client complain that the Sequence Generator is Broken. I can only assume that this is because the table does not exist.

      As far as I can tell, the EJB manager simply needs to commit a transaction. Is there a way to force the EJB manager to commit the database transaction? Am I missing the point on something?

      I've spent many many hours on this and cannot resolve it. Please help.

      - Jere

        • 1. Re: Template Table (TestEntity) not Being Created
          qjereq

          I should also mention that I am using an XA datasource.

          • 2. Re: Template Table (TestEntity) not Being Created
            qjereq

            For my first post, I was using the XA javax jdbc driver. After coming to the conclusion that my problem had something to do with a transaction aware JDBC driver not committing a transaction, I decided to try the non XA SQL driver. I created a new service using the example mssql-service.xml file and redeployed using the new datasource's name and this time it worked. The table is there and the template client runs fine.

            Okay... so I've narrowed the problem down, but I still want to use the XA driver. Is this a bug, a feature, or what?

            - Jere