1 Reply Latest reply on Jun 22, 2003 6:57 PM by Jez Humble

    Does JB 3.2 support auto increment?

    Ian Hunter Newbie

      Hi Folks,

      Trying to get AUTO_INCREMENT support running with JBoss 3.2.0. However it seems to be hard coded to use jbosscmp-jdbc_3_0.dtd

      Is there a way to get jbosscmp-jdbc_3_2.dtd accepted instead?

      Many Thanks
      Ian Hunter

        • 1. Re: Does JB 3.2 support auto increment?
          Jez Humble Newbie

          Hi Ian

          You need to put the following doctype at the top of your jbosscmp-jdbc.xml file:

          <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

          This DTD didn't exist on the jboss site last time I looked (March) but you can find it under docs/dtd in the jboss distribution.

          It turns out that the original DTD (jbosscmp-jdbc_3_0) in the jboss distribution no longer supports the new tags, hence the problem.

          This worked fine with 3.2.0RC3 - I haven't tried since because I ported my app so I didn't have to use auto_increment. You may already know this, but for what it's worth: unless you're sure your app will always run on the same db it's not a very portable way to go about things. If you're interested, you can check out Marinescu's EJB design patterns (which you can download from theserverside.com iirc) for some alternatives.

          Ta,

          Jez.