About Question enthuware.oce-ejbd.v6.2.354 :
Moderator: admin
-
- Posts: 54
- Joined: Tue Apr 19, 2011 10:32 am
- Contact:
About Question enthuware.oce-ejbd.v6.2.354 :
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?
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?
-
- Posts: 54
- Joined: Tue Apr 19, 2011 10:32 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
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).
-
- Posts: 54
- Joined: Tue Apr 19, 2011 10:32 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
I would add the keyword on class declarations, for the sake of validity.
Code: Select all
class
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
This has been updated.
Thanks for your feedback!
Thanks for your feedback!
Re: About Question enthuware.oce-ejbd.v6.2.354 :
@Statelessadmin wrote:This has been updated.
Thanks for your feedback!
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??
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
@LocalBean is not required. If there is no @Local, @LocalBean, and @Remote annotation on the bean, a no-interface view is assumed.
HTH,
Paul.
HTH,
Paul.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
The explanation says :
In question 20, the explanation says
"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......"
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).Access to an ejb through the local client view requires the collocation in the same JVM of both local client and the ejb....
In question 20, the explanation says
I think the explanation of this question can be changed into :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.
"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......"
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.354 :
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."
Who is online
Users browsing this forum: No registered users and 8 guests