Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Janna Davis

Greenhorn
+ Follow
since Dec 24, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Janna Davis

I'm trying to use Hibernate to insert a row using a stored proc in a legacy database. I've been reading various bits on the web about using Hibernate with stored procs (including posts on Java Ranch), but I'm still confused. I'm totally new to Hibernate, so the issue could simply be a lack of understanding.

I populate a domain object and then map the domain object to the db table by way of the stored proc, or at least that's what I'm trying to do. The domain object (named "EventLog") is a POJO, the database is Sybase, and current app uses Spring/Hibernate. Here's how the mapping currently looks:



I'm trying to call this using the following code in my DAO:



I would include the source for the store proc, but it's very long (multiply pages).

Can anyone tell me if the mapping above has some obvious bug in it? One thing I'm unclear on is what the "table" attribute should be in this case, i.e. the stored proc name, the actual db table name? I did try the table name and got an exception saying the columns in the mapping didn't match the columns in the table (which they don't, since I used the stored proc's properties as the "column" names in the mapping).

Any help would be appreciated. And if I need to post some more code, please let me know what would be helpful.

Thanks.
I passed the SCDJWS exam yesterday. My score was 76%, not terrific, but a pass is a pass. The exam was difficult, more so than SCJP, SCBCD, and SCWCD. The number of topics/API's makes it more difficult, that and the fact that there isn't an official study guide. Speaking of studying, the following is what I used to prepare:

- "J2EE Web Services" by Richard Monson-Haefel (which I read 3 times)
- "Building Web Services with Java" by Graham, Davis, etc. (read once)
- Blueprints (only read select chapters)
- MZ notes (absolutely invaluable!! THANKS SO MUCH MZ!)
- Whizlabs mock exam (more difficult than the real exam - I scored a 62% on the Whizlabs final exam!)
- xyzws.com mock exams - took one mock a day for the last week

The Whizlabs and xyzws mock exams are not perfect, but really helped a bunch.

Anyway, I'm very glad to have this one behind me. It was difficult, and many of the topics were not very interesting (UDDI and JAXR were especially dull). Now I need to figure out "what next?"

I wish all of you preparing for the exam the best of luck.

thanks,
Janna
13 years ago