jQuery in Action, 2nd edition*
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 Android Security Essentials Live Lessons this week in the Android 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...
 
wood burning stoves
 
subject: Glassfish + jdbcrealm
 
Similar Threads
How to replace Derby with MySQL Ant properties & CLASSPATH reference
Persisting pojo with collection attribute using Hibernate
Mapping ENUM('0', '1') or CHAR(0) for Boolean
Auto increment PK using Cach´┐Ż from InterSystems?
Mapping same POJO to two tables in Hibernate XML mapping files