Hi, I am running examples from a book that I purchased and have reached something odd. I have a Remote Entity Bean which has an entity relation ship to another Entity Bean which is accessed through a local interface. All beans are housed in a single jar. When I deploy my sample bean JBoss creates a stack trace saying that my remote bean must have a local home interface. Messages directly before the stacktrace indicate that JBoss does locate the remote interfaces that I want to use. Does JBoss require that a Remote Entity Bean referencing a Local Entity Bean also provide Local interfaces too?
Beans take part in relationships only through their local interfaces. So if you want to access the relationship pair remotely you have to provide local intefaces for the one bean and both local and remote view for the bean that the client will lookup . The first (local view ) is for the relation between the beans and the remote interface is for the client to access them remotely .
I agree with what you say. I did add the Local interfaces and everything worked. I checked the messages boards at both Jboss.org an sourceforge and there seems to be a tiff with regard to whether this is a bug or not. One thing that is not clear to me is why when your direction is uni-directional there necessarily needs to be a local interface in the opposite direction not [apparently] used by the referenced bean. I realize why the local interfaces are required when there is a bi-directional relationship, but I don't see what purpose this serves when the relationship is one-way. Can you clear this up for me? Thanks, Terry
An entity bean that does not have a local interface can have only unidirectional relationships from itself to other entity beans. The lack of a local interface prevents other entity beans from having a relationship to it.
I'll check this at home ASAP.
I didn't say it. I'm just telling you what this tiny ad said.
SKIP - a book about connecting industrious people with elderly land owners