-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: HiLo EJB
PostPosted: Thu Jun 24, 2004 12:34 pm 
Beginner
Beginner

Joined: Sun Mar 28, 2004 9:01 am
Posts: 21
Hello,

on page http://www.hibernate.org/47.html I found a solution for the problem using Hibernate from within an EJB. Although I copied the EJB and deployed it on my machine I'm still not able to use a HILO Generator within my EJB's. I get the following error message:

java.sql.SQLException: SQL-Anweisung zur Ausf


Top
 Profile  
 
 Post subject: HiLo EJB
PostPosted: Fri Jun 25, 2004 8:32 am 
Beginner
Beginner

Joined: Sun Mar 28, 2004 9:01 am
Posts: 21
... first I forgot to mention that I used the TableHiLoGenerator instead of the 'new HiLoGenerator' because there is no HiLoGenerator in the Hibernate framework.

The problem was that I did not initialize the TableHiLoGenerator with the table parameters. At least I did not initialize the TableHiLoGenerator at all.

Therefore I had to implement the Configurable Interface. The problem with this is, that I now have to create the bean when the Hibernate classes are initialized. As I encapsulate Hibernate within an MBean (which get's loaded before the EJB's are loaded) I cannot access the EJB that I need to create for HiLoGeneration.

As I do not want to use Long Identifiers but do not want the database to generate Identifiers I really ask myself how I can managed the Keygeneration using Hibernate?

Thanks for any help on this topic!
Greets Rene


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 11:37 am 
Regular
Regular

Joined: Mon Jun 14, 2004 1:42 pm
Posts: 80
Location: Brazil
I'm interessed in this topic too. But I can't imagine a solution that is not bound to database (sequence), what I dislike. Maybe access a separate process that gives you an id , and goes using plain jdbc!!! becouse for me, looks like everybody in sun just ignored the need that an application may have to open 2 different connections to the same database..errr.. Datasource. Look in the spec o JCA, I can't find a way to do that. One UserTransaction to rule them all!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.