[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBM 2.0 JDBCPersistenceManager - volunteers?
by timfox
Hi Anthony-
The primary objective of this exercise is to avoid having to maintain our own set of DDL and DML for each database, this is what we already do in JBM 1.x and is a big PITA and maintenance hassle.
The idea was to leverage Hibernate to abstract out the differences between the different databases DDL, DML.
One way to do that, would be to use Hibernate as ORM.
Currently we just use a few simple hand tuned SQL statements, note that we *do not* have an existing domain model that maps to the tables.
If we were to use Hibernate as ORM we would have to create a domain model. Also it's my understanding we would have caching (which we don't want). All which seems a lot of unnecessary overhead.
I know very little about Hibernate and what it is capable of, but I was under the impression it provided an API that would let us map "abstract" DDL/DML (i.e. using some abstract database indepdendent query language), into *real* DDL/DML that could be used against a specific database.
If this is the case, it would seem this is the simplest way to fulfil our requirements - this would avoid having to create/maintain an extra domain layer that we really don't need.
However, maybe I am mistaken / misinformed and such an API does not exist, in which case I imagine we need to go down the ORM route. If this is the case I would like to know if HIbernate can be configured to not cache - basically just act as a raw "translator".
If you could advise me on my assumptions/misundertstandings that would be great. :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117840#4117840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117840
18 years, 2 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBM 2.0 JDBCPersistenceManager - volunteers?
by AnthonyHib
Hi Guys,
I've read the topic twice but excuse me if I've misunderstood something.
Here are my comments:
1- Using Hibernate/JPA just because Schema Export is useful isn't a sufficient argument. Schema Export is a development tool. Generated Schemas need to be reviewed/tuned by a DBA, so you cannot rely 110% on it in production
2- Using Hibernate/JPA to generate the Schema and then use pure JDBC seems weird.
3- I don't feel detyped/dynamic model will be more efficient than a pure oo domain model
If you requirements are:
- DML/DDL depending the target DB
- most efficient module in terms of performance, avoid the little overhead of ORM
Then I'd suggest you to go and use pure JDBC and write a set of fully tested DDL/DML for each database and insert a config parameter.
Anyway, if your model isn't complex, I'd suggest you to code 3 prototypes
- OO domain model + ORM
- OO domain model + JDBC
- map of map with jdbc
and test it under heavy load
I'm pretty sure the overhead of ORM will be very very small.
I'd be happy to help you to tune your ORM based prototypes.
Anthony Patricio
Hibernate/JPA support engineer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117824#4117824
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117824
18 years, 2 months