• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3, lack of FAQ

 
Gili Tzabari
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • 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 ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!