• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Persistence Unit Configuration in GlassFish

 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello There !

How's everything going on lately? Glad to post here.

I was wondering If anybody could Help me, I'm trying to learn how to configure a Persistence Unit inside GlassFish. But I have not been able to find the Tutorial for this task. Could anybody help me?

What I want to do eventually is to use the @PersistenceContext Annotation to get a reference to an Entity Manager, that holds My Entity Classes; the unit, right?

How can I configure this from inside GlassFish, let's say.....for a MySQL db, for example...

I hope you guys can help me out !

Sincerely,

Jose
 
Scott Selikoff
author
Saloon Keeper
Posts: 4031
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a tip for setting it up using NetBeans, although I can't find one off hand to do it manually: http://blogs.sun.com/arungupta/entry/totd_38_creating_a_mysql

I would think Glassfish has a tutorial/xml files to do this, but I could be wrong.
 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day Scott,

What I have discovered is that I lack the proper undertanding of how are Entities packaged. I need to study further on the subject otherwise I'll not get it right. However the short tutorial you found appears to be somewhat useful, the only thing I didn't like about it is that, it starts from creating the entities based on the database tables. I need to do it in the other way, that is to create the Entities independently, package them and deploy them.

I think I need to study about JPA deployment.

Anyways, Thank you very much Scott. see you next time.

Best Regards,

Jose
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic