Page 1 of 1
About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Tue May 03, 2011 9:25 am
by deadlock_gr
I think that the second answer is not correct. I think that it is missing the part in bold:
public interface XLocal{
public void m1();
}
@Stateless
@Local(XLocal.class)
public XLocalBean implements XLocal{
public void m1(){
...
}
}
if the implementation of the local interface is missing, how is it going to be injected?
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Tue May 03, 2011 9:29 am
by deadlock_gr
False alarm, from section 4.9.7, last bullet says:
While it is expected that the bean class will typically implement its business inter-
face(s), if the bean class uses annotations or the deployment descriptor to designate its
business interface(s), it is not required that the bean class also be specified as imple-
menting the interface(s).
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Sun May 29, 2011 4:51 am
by deadlock_gr
I would add the
keyword on class declarations, for the sake of validity.
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Sun May 29, 2011 4:25 pm
by admin
This has been updated.
Thanks for your feedback!
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Wed Nov 14, 2012 10:40 am
by eugenbesel
admin wrote:This has been updated.
Thanks for your feedback!
@Stateless
public class XLocalBean{
public void m1(){
...
}
}
is a correct answer, but ...
The class with non-interface view should have the annotation @LocalBean, should it?
Or is this annotation default if nothing given??
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Sun Nov 18, 2012 10:17 am
by admin
@LocalBean is not required. If there is no @Local, @LocalBean, and @Remote annotation on the bean, a no-interface view is assumed.
HTH,
Paul.
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Tue May 19, 2015 5:05 pm
by himaiMinh
The explanation says :
Access to an ejb through the local client view requires the collocation in the same JVM of both local client and the ejb....
I believe the client and bean not only in the same JVM, but also the same application/module (eg in the same .ear file or in the same .war/.jar file).
In question 20, the explanation says
The same JVM is not the only requirement to be able to access the no-interface /local view. The client should be packaged with the same ejb application.
I think the explanation of this question can be changed into :
"Access to an ejb through the local client view requires the collocation in the same JVM and application/module of both local client and the bean......"
Re: About Question enthuware.oce-ejbd.v6.2.354 :
Posted: Tue May 19, 2015 8:13 pm
by admin
It is already mentioned there in the next sentence - "Access to an enterprise bean through the local client view is only required to be supported for local clients packaged within the same application as the enterprise bean that provides the local client view."