Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Relationships  RSS feed

 
Atul Prabhu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new in EJB. So if it is trivial question, please do bear with me

I am trying to implement 1:N relationship between two beans.
My question is whether EJB 2.0 handles referential integrity.i.e.
For ex: Company -- Employee
1 -- N

Employee bean would have a company id which would be a foriegn key
pointing to Company.

So does the container create a foriegn key constraint in the
database for a company id.

I am using Weblogic 6.1 .

Thanks for the help in advance.

Regards
Atul
 
Alex Sharkoff
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Atul,

EJB 2.0 specification does not explicitly indicate that the ejb server is to create foreign key constraints.

However, a particular implementation of ejb server might implement it as an additional functionality.

For example, JBoss does have such feature - it is configured in the jboss specific xml files. I would suggest that you refer to a Weblogic documentation (I guess to a section, which describes how to configure CMP entity beans)


Hope it helps.
 
Atul Prabhu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,


Thanks for ur reply.

Regards
Atul
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!