| Author |
Doubt in EJB3.0 specification-business interface
|
gaurav singhal
Ranch Hand
Joined: Nov 18, 2005
Posts: 135
|
|
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
|
 |
Rajan Murugan
Ranch Hand
Joined: Jun 24, 2006
Posts: 182
|
|
|
What is the contradiction? Your question is not clear.
|
With Regards,<br /> Rajan<br />"Java Rocks"
|
 |
gaurav singhal
Ranch Hand
Joined: Nov 18, 2005
Posts: 135
|
|
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
Joined: Jun 24, 2006
Posts: 182
|
|
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 ]
|
 |
 |
|
|
subject: Doubt in EJB3.0 specification-business interface
|
|
|