• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Implementing Remote and local interface at the same time ?

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can an enterprise bean have remote and local interfaces at a time? i.e can a bean have remote and local client at the same time? it it allowed? If this is allowed, then a bean should have a remote and local interface, also a remote home and local home interface. In that case, should the remotly exposed methods be same as locally exposed methods ?
thanks in advance
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it is possible to have both remote and local interfaces for a bean. It is not required that methods exposed in the component interface(local and remote)be the same .
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Pradeep says, it is definitely possible, though it happens in less cases than you may think. For the most part code written for local clients is not coarse-grained enough to be used as for remote clients. Therefore, I rarely find the need to write an ejb to support both. In fact, I don't typically find the need to write ejbs that are remoteable at all since I always try to co-located the web tier whenever possible.
Regardless, the problem that some people have in this respect is that I still see alot of ejb code which throws RemoteExceptions from the Bean Implementation class. Since local interfaces are not allowed to throw RemoteExceptions the developers then run into trouble deploying the ejbs. Other than that it is a fairly straight-forward exercise to implement both types of interfaces.
[ August 27, 2003: Message edited by: Chris Mathews ]
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Chris and Pradeep !
 
reply
    Bookmark Topic Watch Topic
  • New Topic