[
http://jira.jboss.com/jira/browse/JBESB-802?page=comments#action_12371632 ]
Mark Little commented on JBESB-802:
-----------------------------------
The ServiceInvoker exposes service names and categories yet still allows Messages to be
defined in their entirety. That's fine because that's pretty much what Invoker
did. However, they are two different abstractions at two different levels in the call
hierarchy: service names are a higher level abstraction whereas Messages are lower level.
Messages were not intended to be used directly by the majority of developers. Think of
them like Web Services Envelopes: you don't manipulate the header information yourself
(much); you tend to work on the payload, and even then it's abstracted away by nice
tools like WSDL2Java and the underlying SOAP stack.
When you say that "ServieInvoker doesn't expose anything physical to the calling
code" it does: it's exposing Messages and therefore exposing the header (Call
instance). If you look at the pre-Rosetta stuff, you'll see that the (rough)
equivalent of SI (ClientPlugin) worked in terms of Body only, so in SI terms, I'd have
thought:
sendSync(Body b)
sendAsync(Body b)
would have been more of a logical abstraction. Actually, probably (and in C++
pseudo-code):
sendSync(Body b, String replyTo servicename1 = null, String faultTo servicename2 = null);
sendAsync(Body b, String replyTo servicename1 = null, String faultTo servicename2 =
null);
Maybe we're still not connecting on the use of ServiceInvoker, because when you told
me last week "it's one instance per service per client" the abstraction I
just outlined is more what I expected. What's there breaks your own rule because by
allowing Message to be passed in, someone can define their own Call instance that has
nothing whatsoever to do with the servicename used to create the SI instance initially and
attach it to the Message. Then we have "one instance per many services per
client".
ServiceInvoker should hide EPRs
-------------------------------
Key: JBESB-802
URL:
http://jira.jboss.com/jira/browse/JBESB-802
Project: JBoss ESB
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Rosetta
Affects Versions: 4.2 Milestone Release 3
Reporter: Mark Little
Assigned To: Mark Little
Fix For: 5.0 Milestone Release 1
EPRs were never intended to be used by the majority of developers. They are the
"physical" address of individual services. The "logical" name is the
service name, that might map down to one or more EPRs. But most of the time developers
would be using the logical name. At least that was the approach in the original
pre-Rosetta days. By the time you get down to working with EPRs and headers (Call)
you're really working at the lowest level and talking about a specific Message going
to a specific service instance.
The higher level abstraction should be working only in terms of the message payload
(Body, Attachments, etc.) and service names. FaultTo, To, ReplyTo etc. would be abstracted
to service names by the API. The implementation would hide the mapping of service name to
specific EPRs when necessary to ultimately deliver a message.
Shouldn't ServiceInvoker work in the same way? On the one hand it seems to be one SI
instance per client per service (you create the instance and pass in the servicename
[equivalent of defining To]). However, because the deliverSync and deliverAsync work in
terms of Messages, it's then entirely possible for that information to be ignored by
the user, i.e., you can use any SI instance to deliver a message to any service as long as
you define the To field correctly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira