Experience with using JBoss/CMPs as a DB independent platfor
bmacy Aug 17, 2002 11:13 PMI've spent the last 2 weeks playing with my Alpha J2EE application (developed on JBoss 3.0.1rc1 and PostgreSQL 7.2) on Oracle 9i, Firebird, and with PostgreSQL pseudo-XA support. It's been interesting and probably nothing new to anyone here but I figured I'd post a bullet list of my experiences (and maybe someone can tell me what I'm smoking)...
- 2pc... Using JMS and CMP with a MessageDrivenBean and a non-2pc JDBC driver is basically gauranteed warnings about how you aren't getting the transaction integrity you are expecting. This is true, but seeing as I haven't seen anyone screaming about any great DBs with JDBC drivers with full XA support this is a bit of an issue to get full use of J2EE.
- The DS setup is a pain... the example config files (.e.g oracle-service.xml) aren't right, especially when it comes to some of the things they depend on. For instance, "Minerva JDBC LocalTransaction ResourceAdapter" doesn't seem to actually exist and the JBoss name needs to be substituted. Not a big deal but it can take quite some time to debug if you aren't used to it.
- Unique Ids... everyone does them differently... hopefully we'll get JDBC 3.0 drivers that will resolve this.
- Reserved words... I was surprised to find that the JCA layer doesn't map/escape column names to avoid conflicts with reserved words.
- Oracle Objects.... I still can't get Oracle to work with Objects. I get StreamCorruptedExceptions when reading in HashMaps (small < 500 bytes) for my CMP objects. There doesn't seem to be a solution for this and I've tried everything I could find.
- Foreign Keys Constraints... great things to have but I couldn't even get Firebird to create the tables because alter table was being called on "open tables". Essentially, CMP B would be deployed containing a foreign key to CMP A's table. The alter table on CMP A's table would fail. I ended up removing them... made it a pain to drop tables anyways.
- Firebird character transliteration... not sure what is up with this but it seems that I can't fetch NULL VARCHAR values our of the database as java.lang.String without getting org.firebirdsql.gds.GDSExceptions.
Anyways, so basically I'm 1 for 3... hopefully in the next couple of weeks that will improve.
Brian Macy