About Question enthuware.oce-ejbd.v6.2.354 :

Moderator: admin

Post Reply
deadlock_gr
Posts: 54
Joined: Tue Apr 19, 2011 10:32 am
Contact:

About Question enthuware.oce-ejbd.v6.2.354 :

Post 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?

deadlock_gr
Posts: 54
Joined: Tue Apr 19, 2011 10:32 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post 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).

deadlock_gr
Posts: 54
Joined: Tue Apr 19, 2011 10:32 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post by deadlock_gr »

I would add the

Code: Select all

class
keyword on class declarations, for the sake of validity.

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post by admin »

This has been updated.

Thanks for your feedback!

eugenbesel

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post 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??

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post 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.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post 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......"

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.354 :

Post 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."

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests