• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q: CMRs in Remote Interface Of Entity Beans

 
Arthur Orange
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read here :

http://java.boot.by/bcd-guide/ch06.html

that

"The collection classes that are used for container-managed relationships MUST NOT be exposed through the REMOTE interface of the entity bean."

What the devil is the fellow talking about? what would be an example of this? and why is it not mentioned in HFEJB?
 
sandeep vaid
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The answer for this

"The collection classes that are used for container-managed relationships MUST NOT be exposed through the REMOTE interface of the entity bean."


is that the remote interface can access the collection of the local interfaces throught the collection retuned by the one to many unidirectional CMR, as the Remote Interface can access the local interface in CMR but the other way is not possible because the CMR's can not get return collection of Remote interfaces.

So if there is one side is Remote Interface and the other side is local interace then Remote can get the collection of the local interface in CMR, But the Remote Interface can not expose the collection of the local interface to the remote client.

So this is unidirectional CMR's

Thanks!!
Sandeep Vaid
 
Arthur Orange
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I apologize but I will have to read this again to understand what you are saying (I know I have read it 3-4 times already) but thanks for responding anyway I am sure it will dawn upon me.

I know that the local interfaces:ejbLocalObjects/EjbLocalHomes cannot be exposed through a remote interface because you don't want a remote client calling upon them. Am I right upto now?

But what does this have to do with a collection being returned by the CMR? The collection is going to be a list of entity beans right? Entity bean interfaces (mostly can be accessed through remote interfaces) right? then what are you talking about here my dear friend.



Originally posted by sandeep vaid:
Hi,
The answer for this

"The collection classes that are used for container-managed relationships MUST NOT be exposed through the REMOTE interface of the entity bean."


is that the remote interface can access the collection of the local interfaces throught the collection retuned by the one to many unidirectional CMR, as the Remote Interface can access the local interface in CMR but the other way is not possible because the CMR's can not get return collection of Remote interfaces.

So if there is one side is Remote Interface and the other side is local interace then Remote can get the collection of the local interface in CMR, But the Remote Interface can not expose the collection of the local interface to the remote client.

So this is unidirectional CMR's

Thanks!!
Sandeep Vaid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic