This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Glassfish + jdbcrealm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Glassfish + jdbcrealm" Watch "Glassfish + jdbcrealm" New topic
Author

Glassfish + jdbcrealm

Kristofer Hindersson
Greenhorn

Joined: Jan 19, 2010
Posts: 25
Hi,

I'm trying to setup a jdbcrealm in Glassfish with MySQL and I can't find any complete examples on how to do this. All the examples I've seen so far just assumes that you're going to insert the appropriate values directly into the tables, but what about the corresponding JPA entities and the mappings between them? If I have the following tables (following the jdbcrealm standard):

MySQL:


Won't this result in two entities with a unidirectional @ManyToOne-mapping going from Group to User and wouldn't that be considered to be a "faulty" mapping? The rigidity of the requirements on the table setup when using jdbcrealm with Glassfish appears akward and unintuitive to me.
Kristofer Hindersson
Greenhorn

Joined: Jan 19, 2010
Posts: 25
Apparently it's even worse than I thought and you are forced to use natural keys...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Glassfish + jdbcrealm