The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Duran (6) [Avatar] Offline
#1
Hi all,

On pg 305 of EJB 3 in Action it says that most of the time leaving the name element out for the @PersistenceContext is fine,except in the unlikely event that it is declared at the class level...BUT 2 pages before that they use an example of @PersistenceContext used at the class level with only a unitName attribute?!?!?

Message was edited by:
Duran
dpanda (136) [Avatar] Offline
#2
Re: @PersistenceContext(name="jndiName")
Are you referring to the side bar in page 307, it defines a name element too that is used at the class level because it uses the name to do the lookup!
Duran (6) [Avatar] Offline
#3
Re: @PersistenceContext(name="jndiName")
Ah sorry,at the time of writing this I thought that class-level was the same place where we put instance variables...I understand now.