Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

No Remote Interfaces? JBoss/J2EE

  Asked By: Meenachi    Date: Jul 17    Category: Java    Views: 985
  

I'm getting an exception when I try to follow an object reference in my J2EE application using JBoss

The following paragraph in the EJB 2.0 book suggests a frightening possibility:

"The remote interface of a bean is not allowed to expose its relationship fields. In the case of a HomeAddress field, we have declared the type to be AddressLocal, which is a local interface, so the setHomeAddress()/getHomeAddress() accessors cannot be declared in the remote interface of the Customer EJB. The reason for this restriction on remote interfaces is fairly simple: the EJBLocalObject, which implements the local interface, is optimized for use within the same address space or process as the bean interface and is not capable of being used across the network. In other words, references that implement the local interface of a bean cannot be passed across the network, so a local interface cannot declared [sic] as a return type of a parameter of a remote interface."

I'm creating an EJB from a remote interface, where it contains a reference to another bean remote interface (both are remotes.) The error I get is:

This suggests a terrifying restriction that you basically cannot have one object refer to another in a distributed/remote situation. That just can't be, or else, what is the point of EJBs if not to abstract from a database to objects?

If anyone understand this problem better than me or my team, please let me know.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Chad Bradley     Answered On: Jul 17

can u send a sample of ur code?

 
Didn't find what you were looking for? Find more on No Remote Interfaces? JBoss/J2EE Or get search suggestion and latest updates.




Tagged: