IntelliJ open source
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » EJB Certification (SCBCD)
 
RSS feed
 
New topic
Author

What is unitName in @PersistenceContext?

Debopam Poddar
Greenhorn

Joined: Jun 21, 2005
Messages: 22

Please explain unitName in @PersistenceContext and what is its significance?

Can I put and String value as a unitName ?
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Messages: 893

Hi Debopam


The unit name for your persistence context represents the name for your persistence unit. Take a look in your persistnce.xml.
A persistence unit is a collection of classes around a database. You can have various persincence units according with your needs.


the injection for this will be :


Regards,
Mihai

SCJP, SCJD, SCWCD
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » EJB Certification (SCBCD)
 
RSS feed
 
New topic
The most intelligent Java IDE