• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB3, lack of FAQ

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got a long list of frequently asked questions which no one seems to know the answers to (EJB3 being new and all). Please let me know if you know the answers to any of these. In all the following questions, whenever I ask about EJB3 I am also wondering about Glassfish.

1) Is there an official EJB3 forum anywhere?

2) The specification explicitly states @Entity is meant for classes, not interfaces but then how is one supposed to use @ManyToOne against a property whose type is an interface? I believe the answer is, it is impossible. I've got a subclass which knows the exact class that @ManyToOne is supposed to map to so I'd like to define a @ManyToOne annotation in the subclass but the field is defined in the parent class. Is there a way for me to inject a @ManyToOne annotation in the child and associate it with a field inherited from the parent? Is there some other way to do this I am overlooking?

3) How does one persist user-types or custom-types using EJB3? That is, if one of my POJO properties is of type URL or MyCustomClass written by some 3rd party and I cannot mark it up using EJB3 or extend it, how am I supposed to be able to persist it? Hibernate can do this, can EJB3?

More questions to come if the above are answered

Thank you,
Gili
[ August 21, 2006: Message edited by: Gili Tzabari ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, ejb3 is still fresh and I know nothing about it

About question 2, to use an interface, I think that you have to tell which class is implemented, by using the targetEntity parameter of the ManyToOne annotation.
For example,

@ManyToOne( targetEntity=CarRenaultImpl.class )
Car mycar;

But this smells pretty bad

I wish I could help
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic