-
1. Re: Using Hibernate with JBoss 5.1
tcunning Feb 1, 2013 1:36 PM (in response to dbuttery)Dennis,
What exactly are you trying to do? Are you using the Hibernate Gateway? The helloworld_hibernate_action quickstart has a hibernate.cfg.xml that I believe works.
-
2. Re: Using Hibernate with JBoss 5.1
dbuttery Feb 1, 2013 1:45 PM (in response to tcunning)Hi Tom.
Not looking to use the gateway... I'm looking to be able to perform straight-forward CRUD operations on my Oracle database.
Will the quickstart hibernate.cfg.xml suffice to get that going?
-Dennis
-
3. Re: Using Hibernate with JBoss 5.1
tcunning Feb 1, 2013 1:55 PM (in response to dbuttery)Not really. The hibernate gateway is intended to work around the detection of hibernate actions (someone inserting a row, changing a row, deletion, etc).
Can you use JPA? There's plenty of examples of hibernate-based JPA in the server (persistence.xml / jbpm.esb, juddi, etc).
-
4. Re: Using Hibernate with JBoss 5.1
dbuttery Feb 1, 2013 2:46 PM (in response to tcunning)Not too familiar with JPA. Any handy tutorial/example links lying around?
I am looking to get this working from within an ESB. I had been trying to get a xxx-hibernate.xml config working but was slamming into the DOCTYPE & namespace incompatibilities ...
Would it be better to go with a hibernate.cfg.xml approach and define my mappings in code? (i.e. add them directly to the Configuration object?)
-Dennis
-
5. Re: Using Hibernate with JBoss 5.1
tcunning Feb 4, 2013 4:55 PM (in response to dbuttery)Dennis,
I don't have any good examples of hibernate usage inside of ESB, but they shouldn't be that different from what you'd do inside of a .WAR. Have you gone through the examples in the hibernate project? Maybe there's something good there?
Sorry for the lack of help here - this seems more of a straight hibernate issue than an ESB one. The ESB has simple gateways for grabbing data from rows in a database table (helloworld_sql_action for example), and you can use camel_jpa for grabbing objects as well. If you're trying to CRUD operations within your actions though, that seems just like a hibernate configuration issue you are dealing with.
-
6. Re: Using Hibernate with JBoss 5.1
dbuttery Feb 11, 2013 12:59 PM (in response to tcunning)Yep. It turned out to be a simple fix. I went with a straight-forward hibernate.cfg.xml on the classpath ( as opposed to a xxx-hibernate.xml ESB resource) and all is well.