users@glassfish.java.net

RE: EJB3 interfaces with _at_Remote and _at_WebService annotations.

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sat, 1 Aug 2009 20:26:15 -0400

EJB uses RMI (essentially HTTP with serialisation by Java)
http://v1.dione.zcu.cz/java/docs/jdk1.1/docs/guide/rmi/spec/rmi-protocol.doc.html

WebService uses RPC
http://en.wikipedia.org/wiki/Remote_procedure_call

pick one
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sat, 1 Aug 2009 11:28:34 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: EJB3 interfaces with @Remote and @WebService annotations.
>
> Hi,
>
> I've been reading a bit about how to expose some of my stateless session beans as web services. In the book EJB3 in Action, the author says:
>
> ----------
>
> [i]A careful look at the code reveals that the @WebService endpoint interface looks similar to the remote interface. You might be tempted to mark the same interface as both a web service and a remote interface, like this:[/i]
>
> [code]
> @WebService
> @Remote
> public interface PlaceBid {
> public Long addBid(String bidderId, Long itemId, Double bidPrice);
> }
> [/code]
>
> [i]Unfortunately, although some vendors allow this as an extension, this is not part of the specification, and code that uses this particular attribute combination won't be portable.[/i]
>
> ----------
>
> I've skimmed a few dozen examples online and a lot of them use both annotations in the interface. I can't find an explanation of how it works or the 'proper' way of doing things. Can anyone point me in the right direction or explain to me why you're not supposed to use both annotations in the same interface?
> [Message sent by forum member 'jptech' (jptech)]
>
> http://forums.java.net/jive/thread.jspa?messageID=358466
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009