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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

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

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

Post by deadlock_gr »

The explanation of the first answer says:
A method that is annotated with @Asynchronous must not throw any exception.
I think it should be:
A method that is annotated with @Asynchronous and returns void must not throw any exception.

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

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

Post by deadlock_gr »

Also, in last explanation:
All methods that are to be exposed in a business interface must be public. Also, a method that is annotated with @Asynchronous must not throw any exception.
it should be:
All methods that are to be exposed in a business interface must be public. Also, a method that is annotated with @Asynchronous and has return type void must not throw any exception.

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

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

Post by admin »

You are right. Further, instead of exception, it should be application exception. The explanation has been updated.

thank you for your feedback!

kezman9
Posts: 26
Joined: Fri Jul 06, 2012 1:08 am
Contact:

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

Post by kezman9 »

Hi,
From last explanation:
All methods that are to be exposed in a business interface must be public
From Java SE Tutorial http://docs.oracle.com/javase/tutorial/ ... ceDef.html :
All methods declared in an interface are implicitly public, so the public modifier can be omitted
I thought business interfaces are just plain java interfaces, but maybe this is JEE specific behaviour that all methods must have public modifier?

Kind regards,
Jarek

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

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

Post by admin »

Yes, the methods in the interface are public (no need for public modifier). But the code shown is a method with body, that means it is in a class and it must be public.
In this case, interface does not really refer to java interface definition but to the business interface presented by the bean.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests