aspose file tools*
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 Java 8 in Action this week in the Java 8 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
 
Similar Threads
Persisting pojo with collection attribute using Hibernate
Auto increment PK using Cach´┐Ż from InterSystems?
Mapping ENUM('0', '1') or CHAR(0) for Boolean
Mapping same POJO to two tables in Hibernate XML mapping files
How to replace Derby with MySQL Ant properties & CLASSPATH reference