Dostupan JMS 2.0 Public Review Draft
04.01.2013.
Ako radite s JMS možda će vas interesirati da je za pregled i komentare dostupan JMS 2.0 Public Review Draft.
Kao jedan od nazanimljivijih dijelova koji će se pojaviti u Java EE 7, JMS “dvojka” je do 4.2.2013. otvoren za review. Spec lead Nigel Deakin poziva sve da pročitaju draft, stranicu na java.net, downloadaju referentnu implementaciju i ocijene kako im se sviđa.
Prenosimo najvažnije novosti sa stranice projekta:
The JMS 2.0 specification now requires JMS providers to implement both P2P and Pub-Sub.
The following new messaging features have been added in JMS 2.0:
- Delivery delay: a message producer can now specify that a message must not be delivered until after a specified time interval.
- New send methods have been added to allow an application to send messages asynchronously.
- JMS providers must now set the JMSXDeliveryCount message property.
The following change has been made to aid scalability:
- Applications are now permitted to create multiple consumers on the same durable or non-durable topic subscription. In previous versions of JMS only a single consumer was permitted.
Several changes have been made to the JMS API to make it simpler and easier to use:
- Connection, Session and other objects with a close method now implement the java.jang.AutoCloseable interface to allow them to be used in a Java SE 7 try-with-resources statement.
- A new “simplified API” has been added which offers a simpler alternative to the standard API, especially in Java EE applications.
- New methods have been added to create a session without the need to supply redundant arguments.
- Although setting client ID remains mandatory when creating an unshared durable subscription, it is optional when creating a shared durable subscription.
- A new method getBody has been added to allow an application to extract the body directly from a Message without the need to cast it first to an appropriate subtype.
A new chapter has been added which describes some additional restrictions and behaviour which apply when using the JMS API in the Java EE web or EJB container. This information was previously only available in the EJB and Java EE platform specifications.
A new chapter has been added which adds a new requirement for a JMS provider to include a resource adapter, and which defines a number of standard endpoint activation properties.
New methods have been added to Session which return a MessageConsumer on a durable topic subscription. Applications could previously only obtain a domain-specific TopicSubscriber, even though its use was discouraged.