It's not a secret anymore!*
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
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...
 
 
subject: Glassfish + jdbcrealm