Ok, back to the roots...:
I am writing an EJB 3.0 (not 2.x) SB, and I have an EJB 3.0 (not 2.x)
client. I need the EJBHome because the source code of the client uses
that quite heavily internally. No chance to change that code. I just
need that remote home interface for the business use case, not for sake
of EJB 2.1 reasons. Nothing here has to do with 2.x.
My class already looks like this:
@Stateless
@RemoteHome(HelloServerRemoteHome.class)
@Remote(HelloServerRemote.class)
public class HelloServer {
public String greeting() {
return "Hello - Test";
}
}
As you can see, I AM already using @RemoteHome, but it just doesn't work.
Thanks
Markus
Pankaj Jairath schrieb:
> OK. Given that HelloServerRemote class is your EJB 2.x component
> interface, try removing the @Remote annotation that you have provided.
> It should suffice to state the inheritance from EJBObject.
>
> Primarly, to have your EJB 2.x clients access to EJB 3.0 coded/adapted
> bean, you need to annotate the POJO with @RemoteHome (your EJB 2.x
> class for remote home).
>
> Hope this helps.
> Pankaj
> Markus KARG wrote:
>> I know that, but that is no help for me. The client's code wants to
>> access an EJBHome to ejbCreate and home interface methods.
>>
>> Regards
>> Markus
>>
>> Pankaj Jairath schrieb:
>>> With EJB 3.0. one really does not need to define the remote
>>> interface. Should try using the annotation on POJO to create a
>>> session bean. Class level annotations - @Stateless and @Remote
>>> should suffice to define a stateless bean with remote interface.
>>>
>>> If @Remote is not classified then by default a local interface is
>>> rendered with all the public methods as its business methods. One
>>> can limit the selection of such methods by annotating it with
>>> @BusinessMethod
>>> Example:
>>>
>>> import javax.ejb.*;
>>> /**
>>> * A stateless session bean requesting that a remote business
>>> * interface be generated for it.
>>> */
>>> @Stateless
>>> @Remote
>>> public class HelloWorldBean {
>>> public String sayHello() {
>>> return "Hello World!!!";
>>> }
>>> }
>>>
>>>
>>> regards
>>> Pankaj
>>>
>>> Example
>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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.