• 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

Doubt in EJB3.0 specification-business interface

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello frends,

I came across a point in EJB specification which states that

� A bean class is permitted to have more than one interface. If a bean class has more than one interface�excluding the interfaces listed below�any business interface of the bean class must be explicitly designated as a business interface of the bean by means of the Local or Remote
annotation on the bean class or interface or by means of the deployment descriptor.

But I want to understand one thing:

I have 3 interface for helloWorld bean assume hello1,hello2,hello3.

So I will write the bean as either


is this program compile

Then what are the remote and Local interface

According to my understanding it should be

Remote hello1 and hello2
Local hello3 by default.

Please tell me am i correct.
and if the above program is changed as



then the local interfaces are hello1, hello2,hello3. But the above statement says If a bean class has more than one interface�excluding the interfaces listed below�any business interface of the bean class must be explicitly designated as a business interface of the bean by means of the Local or Remote annotation on the bean class or interface or by means of the deployment descriptor. there is contradiction here by default the interface are local or to explicitly mark them as Local or remote
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the contradiction? Your question is not clear.
 
gaurav singhal
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
If by default interfaces which are implemented are local.

If i implement more than one interface why i explicitly need to define business interface using @Remote or @Local annotation. All by default should be considered as local business interface.
 
Rajan Murugan
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My understanding is that a bean can also implement other interfaces which are not business interfaces.Hence to mark those interfaces which are business intgerfaces as business interfaces you need to mention it with @Local or @Remote annotation.The container or someone else may be doing certain things additional by knowing which are the ones which are business interfaces.
[ December 15, 2006: Message edited by: Rajan Murugan ]
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic