users@glassfish.java.net

Re: Session Bean Confusion

From: Markus KARG <karg_at_quipsy.de>
Date: Fri, 11 Apr 2008 16:34:42 +0200

Dies,

you are not right: In EJB 3.0 CORE spec, chapter 4.6.7 "Session Bean's
Remote Interface", read: "The interface must extend the
javax.ejb.EJBObject interface.".

See the problem? I want to write code that complies to the spec. Seems
the verifier doesn't want to... ;-)

Thanks
Markus



Dies Koper schrieb:
> Hello Markus,
>
> I think the verifier told you so because it was confused by something
> else. What did your interface look like before this last change?
> I think it should look like:
>
> public interface HelloServerRemote {
> String greeting();
> }
>
> or
>
> public interface HelloServerRemote extends Remote {
> String greeting() throws RemoteException;
> }
>
> Your home interface and bean class look correct.
>
> Regards,
> Dies
>
> Markus KARG wrote:
>> Dies,
>>
>> thanks for your kind help. No deployment descriptor is used (want to
>> get rid of that now using EJB 3.0...).
>>
>> This is the remote interface (extends EJBObject was added since spec
>> told me to do):
>>
>> @Remote
>> public interface HelloServerRemote extends EJBObject {
>> String greeting() throws RemoteException;
>> }
>>
>> This is the remote home interface:
>>
>> public interface HelloServerRemoteHome extends EJBHome {
>> public HelloServerRemote create() throws RemoteException,
>> CreateException;
>> // Spec says, in this particular case, I do not have to implement
>> ejbCreate in the client, since it is SLSB.
>> }
>>
>> This is the bean class:
>>
>> @Stateless
>> @RemoteHome(HelloServerRemoteHome.class)
>> @Remote(HelloServerRemote.class)
>> public class HelloServer {
>> public String greeting() {
>> return "Hello - Test";
>> }
>> }
>>
>> I cannot see any fault here.
>>
>> Thanks
>> Markus
>>
>>
>>
>>
>> Dies Koper schrieb:
>>> Hi Markus,
>>>
>>> I think the fault in your first try was somewhere else. What did
>>> your interface look like? Was the interface specified in the
>>> deployment descriptor in a tag that was meant for a EJB 2.1 remote
>>> interface?
>>>
>>> Regards,
>>> Dies
>>>
>>> Markus KARG wrote:
>>>> I am using the verifier to check wheter my application is complaint
>>>> to EJB 3.0.
>>>>
>>>> In EJB 3.0 CORE spec, chapter 4.6.7 "Session Bean's Remote
>>>> Interface", it says:
>>>>
>>>> "The interface must extend the javax.ejb.EJBObject interface."
>>>>
>>>> Ok, so I wrote this:
>>>>
>>>> @Remote
>>>> public interface HelloServerRemote extends EJBObject {
>>>>
>>>> But the verifier now complains about doing so:
>>>>
>>>>
>>>> 1 # of Warnings : 0 # of Errors : 0
>>>> ----------------------------- RESULTS FOR EJB-RELATED TESTS
>>>> ----------------------------- -------------- FAILED TESTS :
>>>> -------------- Test Name : tests.ejb.ejb30.BusinessIntfInheritance
>>>> Test Assertion : A business interface must not extend
>>>> javax.ejb.EJBObject or javax.ejb.EJBLocalObject. Please refer to
>>>> EJB 3.0 Simplified API Section #3.2 for further information. Test
>>>> Description : For [ hello#helloserver.jar#HelloServer ] [
>>>> example.server.HelloServerRemote ] extends either
>>>> javax.ejb.EJBObject or javax.ejb.EJBLocalObject.
>>>> ---------------------------------- END OF STATIC VERIFICATION
>>>> RESULTS ----------------------------------
>>>>
>>>>
>>>>
>>>> I am totally confused...?!
>>>>
>>>> What is my fault?
>>>>
>>>> Thanks
>>>> Markus
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


-- 
QUIPSY QUALITY GmbH & Co. KG
Ein Unternehmen der MES-Gruppe
Stuttgarter Strasse 23
D-75179 Pforzheim
Tel: 07231-9189-52
Fax: 07231-9189-59
www.quipsy.de
karg_at_quipsy.de
Registergericht Mannheim HRA 701214
Geschäftsführer: Nils Schroeder
Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe geschützte Informationen und ist ausschließlich für den vorgesehenen o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail versehentlich erhalten haben und nicht der vorgesehene Empfänger sind, bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte informieren Sie uns als Absender über diesen Zustellungsfehler und löschen Sie die E-Mail.