• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Bean calling a Entity Bean  RSS feed

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just checking that if I call want to call a entity bean CheckingBean from a session bean in the same JVM and remote I create two interfaces.

public interface Checking extends EJBObject

public interface CheckingLocal extends EJBLocalObject

Thanks Tony
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tony Evans:
Just checking that if I call want to call a entity bean CheckingBean from a session bean in the same JVM and remote I create two interfaces.

public interface Checking extends EJBObject

public interface CheckingLocal extends EJBLocalObject

Thanks Tony


Don't forget the home interfaces for rmi & local. And don't forget the rmi & local jndi names in the deployment descriptor.

Clustering/failover cannot be implemented for local interfaces. Even though the specs require co-localization of the client & ejb at the jvm level, some app servers (for example weblogic 6.x, don't know about 8.x) are more restrictive & define co-localization as "same application", i.e., both the ejb & the ejb client must be in the same ear/jar.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!