Hello, I'm Rahman from Istanbul JUG;
I have read JMS_SPEC-116 <
https://java.net/jira/browse/JMS_SPEC-116>, in
Description, and I want to give some feedbacks, suggestion 1)
1. Introduce a new interface "javax.jms.JMSMessageEndpoint" (or similar
name) that can be used as a marker interface required by
MessageEndpointFactory.getEndpointClass(). It shall have no methods, not
extend any other interface but simply exist to be a marker that the given
class will have its public methods exposed as potential targets for
messages received by the RA.
There is a suggested JMSMessageEndpoint interface to mark class a JMS
message endpoint. In Java EE practice, I'm seeing annotation markers are
more used than marker interface. For example JSR 356 WebSocket API has
@ServerEndpoint annotation. Like that, JMS might has @JMSMessageEndpoint
annotation instead of a marker interface.
Suggestion 3)
3. Currently, the onMessage method is defined by looking for a method named
"onMessage" that takes a "Message" object as an argument. This algorithm
should be changed to also look for any instance of "JMSMessageEndpoint",
find any method that is annotated as XXX (whatever is defined in 2) as a
possible target, then depending on there being a match between that takes
anything that derives from "Message" and only pass appropriate messages to
it.
As a suggested @JMSMessageEndpoint annotation, message receivers may be
declared by annotation for example @OnMessage.
Also, @OnMessage annotation might have some properties to customize Messge
listener method.
What do you think for that?
Thanks.
--
Rahman USTA
Istanbul JUG
https://github.com/rahmanusta <http://www.kodcu.com/>