Adabas D, Cirpack and Hibernate

It’s more possible than you think!

Use org.hibernate.dialect.SAPDBDialect as the hibernate dialect, and it seems to be good to go. I’ve had to use @IdClass and create @Embeddable key classes for all the cirpack compound keys, but for simple read and edit, this has let me use hibernate, instead of raw JDBC. Hooray for that!

I haven’t figured out a pretty way of dealing with Adabas columns specified as “int” that are only ever used as booleans, but I can live with that for now.

Unfortunately, you _do_ have to actually specify the dialect, as hibernate won’t work this one out on it’s own. Tested with a 2001 dated version of adabasd.jar, and hibernate 3.2.6GA

  1. Hi ! I use Adabasd in my enterprise with jboss and i see that a lot of people search a dialect to speak good with, so i make one, i hope that it can help some peoples ;-)

    https://sourceforge.net/projects/adabasddialect/files/

  2. boblpepeur: Can you please elaborate on the difference between this dialect and the SAPDBDialect that ships with hibernate?

    In the source file, you seem to have just taken the SAPDBDialect and commented out some chunks, except for this piece:


    registerColumnType( Types.VARBINARY, "long" );
    registerColumnType( Types.BLOB, "long" );

    where you removed the “binary” from after the long. You even left the original “author” tag in the file, Brad Clow, though sourcefourge says your name is David K?

    What problems were you having with the SAPDBDialect, that this fixes?

  3. hi the most important change is that
    public String getCrossJoinSeparator() {
    return “, “;
    }
    with new jboss 6, this doesn’t work

    public String getWriteLockString(int timeout) {
    return ” for update with lock exclusive”;
    }

    public boolean forUpdateOfColumns()
    {
    return true;
    }

    that’s for lock row in LockmodType.WRITE with ejb-ql

    registerColumnType( Types.BIGINT, “fixed(18,0)” );

    adabas bigint length is 18

    Yes I take SAPDBDialect for example, i forgot to change the author name ;-)

    If you test it, can you tell me about if you have problems ?

    I make a new version to work with Locks

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>