SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
1
JAX-RS 2.0: New and
Noteworthy in RESTful
Web Services API
Arun Gupta
Java EE & GlassFish Guy
blogs.oracle.com/arungupta, @arungupta
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
2
JAX-RS - Java API for RESTful Services
§  POJO-Based Resource Classes
§  HTTP Centric Programming Model
§  Entity Format Independence
§  Container Independence
§  Included in Java EE
Standard annotation-driven API
that aims to help developers
build RESTful Web services and clients
in Java
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
3
Example: JAX-RS API
@Path("/atm/{cardId}")	
public class AtmService {	
	
@GET @Path("/balance")	
@Produces("text/plain")	
public String balance(@PathParam("cardId") String card,	
@QueryParam("pin") String pin) {	
return Double.toString(getBalance(card, pin));	
}	
	
…	
	
Built-in
Serialization
Resources
URI Parameter
Injection
HTTP Method
Binding
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
4
Example: JAX-RS API (contd.)
…	
	
@POST @Path("/withdrawal")	
@Consumes("text/plain") 	
@Produces("application/json")	
public Money withdraw(@PathParam("card") String card,	
@QueryParam("pin") String pin, 	
String amount){	
return getMoney(card, pin, amount);	
}	
}	
Custom Serialization
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
5
Example: JAX-RS API (contd.)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
6
Example: JAX-RS API (contd.)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
7
JSR-339 a.k.a. JAX-RS 2.0
§  Expert Group formed in February, 2011
–  Lead by Oracle
§  Marek Potociar, Santiago Pericas-Geertsen
–  13 Group members
§  Jan Algermissen, Florent Benoit (OW2), Sergey Beryozkin (Talend/CXF), Adam Bien,
Bill Burke (RedHat), Clinton L Combs, Bill De Hora, Markus Karg, Sastry Mallady
(eBay), Wendy Raschke (IBM), Julian Reschke, Guilherme Silveira, Dionysios
Synodinos
§  Public Review Draft published on Sep 28, 2012
–  See JSR-339 JCP site jcp.org/en/jsr/detail?id=339
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
8
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
9
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
10
Client API
§  HTTP client libraries too low level
§  Leveraging providers and concepts from the JAX-RS 1.x API
–  E.g., MBRs and MBWs
§  Proprietary APIs introduced by major JAX-RS 1.x implementations
–  Need for a standard
Motivation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
11
Client API
// Get instance of Client
Client client = ClientFactory.newClient();
// Get account balance
String bal = client.target("http://.../atm/{cardId}/balance")
.resolveTemplate("cardId", "111122223333")
.queryParam("pin", "9876")
.request("text/plain").get(String.class);
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
12
Client API
// Withdraw some money
Money mon = client.target("http://.../atm/{cardId}/withdrawal")
.resolveTemplate("cardId", "111122223333")
.queryParam("pin", "9876")
.request("application/json")
.post(text("50.0"), Money.class);
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
13
Client API
Invocation inv1 =
client.target("http://.../atm/{cardId}/balance")…
.request(“text/plain”).buildGet();
Invocation inv2 =
client.target("http://.../atm/{cardId}/withdraw")…
.request("application/json")
.buildPost(text("50.0"));
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
14
Client API
Collection<Invocation> invocations = Arrays.asList(inv1, inv2);
Collection<Response> responses = Collections.transform(
invocations,
new F<Invocation, Response>() {
public Response apply(Invocation inv) {
return inv.invoke();
}
});
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
15
Client API
// Create client and register MyProvider1
Client client = ClientFactory.newClient();
client.configuration().register(MyProvider1.class);
// Create atm target; inherits MyProvider1
WebTarget atm = client.target("http://.../atm");
// Register MyProvider2
atm.configuration().register(MyProvider2.class);
// Create balance target; inherits MyProvider1, MyProvider2
WebTarget balance = atm.path(”{cardId}/balance");
// Register MyProvider3
balance.configuration().register(MyProvider3.class);
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
16
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
17
Common configuration - motivation
client.configuration()
.register(JsonMessageBodyReader.class)
.register(JsonMessageBodyWriter.class)
.register(JsonpInterceptor.class)
.setProperty(“jsonp.callback.name”, “callback”)
.setProperty(“jsonp.callback.queryParam”, “true”)
...
Client-side
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
18
Common configuration - motivation
public class MyApp extends javax.ws.rs.core.Application {
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<…>();
…
classes.add(JsonMessageBodyReader.class);
classes.add(JsonMessageBodyWriter.class);
classes.add(JsonpInterceptor.class);
…
return classes;
}
}
Server-side
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
19
Common configuration - solution
client.configuration()
.register(JsonMessageBodyReader.class)
.register(JsonMessageBodyWriter.class)
.register(JsonpInterceptor.class)
.setProperty(“jsonp.callback.name”, “callback”)
.setProperty(“jsonp.callback.queryParam”, “true”)
...
JsonFeature jf = new JsonFeature().enableCallbackQueryParam();
Client.configuration().register(jf);
Client-side
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
20
Common configuration - solution
public Set<Class<?>> getClasses() {
…
classes.add(JsonMessageBodyReader.class);
classes.add(JsonMessageBodyWriter.class);
classes.add(JsonpInterceptor.class);
…
}
public Set<Class<?>> getClasses() {
…
classes.add(JsonFeature.class);
…
}
Server-side
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
21
Common configuration
public interface Configurable {
Map<String, Object> getProperties();
Object getProperty(String name);
Configurable setProperties(Map<String, ?> properties);
Configurable setProperty(String name, Object value);
Collection<Feature> getFeatures();
Set<Class<?>> getProviderClasses();
Set<Object> getProviderInstances();
Configurable register(...);
...
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
22
Common configuration
public interface Feature {
boolean configure(Configurable configurable);
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
23
A Feature example
public void JsonFeature implements Feature {
public boolean configure(Configurable config) {
config.register(JsonMessageBodyReader.class)
.register(JsonMessageBodyWriter.class)
.register(JsonpInterceptor.class)
.setProperty(CALLBACK_NAME, calbackName)
.setProperty(USE_QUERY_PARAM, useQueryParam);
return true;
}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
24
Dynamic Feature
public interface DynamicFeature {
void configure(ResourceInfo ri, Configurable configurable);
}
public interface ResourceInfo {
Method getResourceMethod();
Class<?> getResourceClass();
}
Server-side only
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
25
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
26
Async Processing
§  Server API support
–  Off-load I/O container threads
§  Long-running operations
–  Efficient asynchronous event processing
§  Suspend while waiting for an event
§  Resume when event arrives
–  Leverage Servlet 3.x async support (if available)
§  Client API support
–  Asynchronous request invocation API
§  Future<RESPONSE>, InvocationCallback<RESPONSE>	
  
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
27
Async Processing: Server-side
@Path("/async/longRunning")
public class MyResource {
@GET
public void longRunningOp(@Suspended AsyncResponse ar) {
ar.setTimeoutHandler(new MyTimoutHandler());
ar.setTimeout(15, SECONDS);
Executors.newSingleThreadExecutor().submit(new Runnable() {
public void run() {
…
ar.resume(result);
}
});
}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
28
Async Processing: Server-side
public interface AsyncResponse {
public void resume(Object/Throwable response);
public void cancel();
public void cancel(int/Date retryAfter);
public boolean isSuspended();
public boolean isCancelled();
public boolean isDone();
public void setTimeout(long time, TimeUnit unit);
public void setTimeoutHandler(TimeoutHandler handler);
public boolean register(Class<?> callback);
public boolean[] register(Class<?> callback, Class<?>... callbacks);
public boolean register(Object callback);
public boolean[] register(Object callback, Object... callbacks);
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
29
Async Processing: Server-side
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Suspended {
}
public interface TimeoutHandler {
void handleTimeout(AsyncResponse asyncResponse);
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
30
Async Processing: Server-side
public interface ResumeCallback {
public void onResume(AsyncResponse resuming, Response response);
public void onResume(AsyncResponse resuming, Throwable error);
}
public interface CompletionCallback {
public void onComplete();
public void onError(Throwable throwable);
}
public interface ConnectionCallback {
public void onDisconnect(AsyncResponse disconnected);
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
31
Async Processing: Client-side
WebTarget target = client.target("http://.../balance”)…
// Start async call and register callback
Future<?> handle = target.request().async().get(
new InvocationCallback<String>() {
void complete(String balance) { … }
void failed(InvocationException e) { … }
});
// After waiting for too long…
if (!handle.isDone()) handle.cancel(true);
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
32
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
33
Filters & Interceptors
§  Customize JAX-RS request/response processing
–  Use Cases: Logging, Compression, Security, Etc.
§  Introduced for client and server APIs
§  Replace existing proprietary support
–  Provided by most JAX-RS 1.x implementations
§  All using slightly different types or semantics
Motivation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
34
Filters & Interceptors
§  Non-wrapping filter chain
–  Filters do not invoke next filter in
the chain directly
–  managed by the JAX-RS runtime
§  Each filter decides to proceed or
break the chain
Filter each incoming/outgoing message
§  Request è Request
–  ContainerRequestFilter,	
  
ClientRequestFilter	
  
§  Response è Response
–  ContainerResponseFilter,	
  
ClientResponseFilter
§  Server-side specialties
–  @PreMatching,	
  DynamicFeature
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
35
Filters & Interceptors
public class RequestLoggingFilter implements ContainerRequestFilter {
@Override
public void filter(ContainerRequestContext requestContext) {
log(requestContext);
// non-wrapping => returns without invoking the next filter
}
...
}
A Logging Filter Example
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
36
Filters & Interceptors
§  Invoked ONLY when/if entity
processing occurs
–  Performance boost
§  Wrapping interceptor chain
–  Each interceptor invokes the next
one in the chain via
context.proceed()	
  
Intercept entity providers
§  MessageBodyReader interceptor
–  ReaderInterceptor interface
§  MessageBodyWriter interceptor
–  WriterInterceptor interface
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
37
Filters & Interceptors
public class GzipInterceptor implements ReaderInterceptor {
@Override
Object aroundReadFrom(ReaderInterceptorContext ctx) {
InputStream old = ctx.getInputStream();
ctx.setInputStream(new GZIPInputStream(old));
// wrapping => invokes the next interceptor
Object entity = ctx.proceed();
ctx.setInputStream(old);
return entity;
}
}
A GZip Reader Interceptor Example
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
38
Application
Filters & Interceptors
Request Filter Filter
Network
Transport
…
…
Response Filter
Filter
write(…)
Writer
Interceptor
… MBW
read(…) - optional
…
MBR
Writer
Interceptor
Reader
Interceptor
Reader
Interceptor
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
39
Response
Application
Filters & Interceptors
Filter Filter
Network
… Response
Filter
Filter
write(…)
…
MBW
Writer
Interceptor
Writer
Interceptor
Filter Filter
… Request
Request
read(…) - optional
Reader
Interceptor
… MBR
Reader
Interceptor
Filter Filter
Resource
Matching
@PreMatching
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
40
Bindings & Priorities
§  Binding
–  Associating filters and interceptors with resource methods
–  Server-side concept
§  Priority
–  Declaring relative position in the execution chain
–  @BindingPriority(int	
  priority)	
  
§  Shared concept by filters and interceptors
Scoped Binding Global Binding
Static @NameBinding (@Qualifier?)
Default
@PreMatching
Dynamic DynamicFeature N/A
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
41
Bindings
@NameBinding // or @Qualifier ?
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(value = RetentionPolicy.RUNTIME)
public @interface Logged {}
@Provider
@Logged
@BindingPriority(USER)
public class LoggingFilter
implements ContainerRequestFilter, ContainerResponseFilter { … }
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
42
Bindings
@Path("/greet/{name}")
@Produces("text/plain")
public class MyResourceClass {
@Logged
@GET
public String hello(@PathParam("name") String name) {
return "Hello " + name;
}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
43
A DynamicFeature example
public void SecurityFeature implements DynamicFeature {
public boolean configure(ResourceInfo ri, Configurable config) {
String[] roles = getRolesAllowed(ri);
if (roles != null) {
config.register(new RolesAllowedFilter(roles));
}
}
…
}
Server-side only
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
44
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
45
Hypermedia
§  REST principles
–  Identifiers and Links
–  HATEOAS (Hypermedia As The Engine Of App State)
§  Link types:
–  Structural Links
–  Transitional Links
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
46
Hypermedia
Link: <http://.../orders/1/ship>; rel=ship,
<http://.../orders/1/cancel>; rel=cancel
...
<order id="1">
<customer>http://.../customers/11</customer>
<address>http://.../customers/11/address/1</address>
<items>
<item>
<product>http://.../products/111</product>
<quantity>2</quantity>
</item>
<items>
...
</order>
Transitional Links
Structural Links
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
47
Hypermedia
§  Link and LinkBuilder classes
–  RFC 5988: Web Linking
§  Support for Link in ResponseBuilder and filters	
  
–  Transitional links (headers)
§  Support for manual structural links
–  Via Link.JaxbAdapter & Link.JaxbLink
§  Create a resource target from a Link in Client API
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
48
Hypermedia
// Producer API (server-side)
Link self = Link.fromResourceMethod(MyResource.class, ”handleGet”)
.build();
Link update = Link.fromResourceMethod(MyResource.class, “handlePost”)
.rel(”update”)
.build();
...
Response res = Response.ok(order)
.link("http://.../orders/1/ship", "ship")
.links(self, update)
.build();
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
49
Hypermedia
Response order = client.target(…).request("application/xml").get();
// Consumer API (client-side)
Link shipmentLink = order.getLink(“ship”);
if (shipmentLink != null) {
Response shipment = client.target(shipmentLink).post(null);
…
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
50
JAX-RS 2.0
§ Client API
§ Common configuration
§ Asynchronous processing
§ Filters
§ Interceptors
§ Hypermedia support
§ Server-side content negotiation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
51
Server Side Conneg
GET http://.../widgets2
Accept: text/*; q=1
…
Path("widgets2")
public class WidgetsResource2 {
@GET
@Produces("text/plain", "text/html")
public Widgets getWidget() {...}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
52
Server Side Conneg
GET http://.../widgets2
Accept: text/*; q=1
…
Path("widgets2")
public class WidgetsResource2 {
@GET
@Produces("text/plain; qs=0.5", "text/html; qs=0.75")
public Widgets getWidget() {...}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
53
JAX-RS 2.0 Summary
§  Major new features
–  Client API, Filters & Interceptors, Asynchronous Resources, Hypermedia
§  Many minor API improvements and extensions
–  Request / Response, URI builder, String Converters, @BeanParam,
MultivaluedHashMap, GenericType, …
§  Improved TCK coverage = improved portability
–  ~350 tests in JAX-RS 1.x, ~1700 tests in JAX-RS 2.0
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
54
<a href=“…” >JAX-RS 2.0</a>
§  Project web site jax-rs-spec.java.net
§  Users mailing list users@jax-rs-spec.java.net
§  JSR-339 site jcp.org/en/jsr/detail?id=339
–  Latest specification text draft
§  java.net/projects/jax-rs-spec/sources/git/content/spec/spec.pdf
–  Latest API snapshot
§  jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/index.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
55
<a href=“…” >Jersey 2.0</a>
§  Project web site jersey.java.net
§  Users mailing list users@jersey.java.net
–  Latest users guide
§  http://jersey.java.net/nonav/documentation/snapshot/index.html
–  Latest API documentation
§  http://jersey.java.net/nonav/apidocs/snapshot/jersey/index.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
56
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
57
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
58
JAX-RS 2.0
§ DI (JSR-330) Integration
§ Bean Validation
§ Improved Java EE Security Support
§ Presentation Layer
§ High-level Client API
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
59
Dependency Injection Integration
§  Support Java Dependency Injection API (JSR-330)
–  Support	
  @Inject	
  and	
  @Qualifier ?
–  @Qualifier	
  as a replacement for	
  @NamedBinding	
  ?
–  Provider vs.	
  ContextResolver ?
–  Support DI (JSR-330) or CDI (JSR-299)?
§  Issues
–  Interference with CDI providers
–  EG does not see enough added value for DI
§  DI-style injection support deferred
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
60
Dependency Injection Integration
§  Java EE Deployments
–  Tight CDI integration makes sense (unification of Java EE component
model)
§  Java SE Deployments
–  DI provides all the required features
–  CDI is too heavy-weight
§  Many redundant features
–  method interceptors, decorators, stereotypes …
§  Additional limitations put on managed components
Support DI (JSR-330) or CDI (JSR-299)?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
61
Bean Validation
§  Dropped from JAX-RS 2.0 Public Review
–  Difficulty aligning schedules
§  Still supported via CDI 1.1
–  JAX-RS resource class must be CDI bean
–  BV 1.1 now supports method validation
§  May revisit current plan post Java EE 7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
62
More Topics…
§  Improved Java EE security
support
–  @RolesAllowed, …
–  SecurityContext.authenticate(…)
§  Pluggable Views
–  Completes the MVC pattern
§  High-level client API
–  Hard to design it to be RESTful
–  Jersey 2 provides an
experimental support
–  Don’t want to end-up with an
RPC-style API

Weitere ähnliche Inhalte

Was ist angesagt?

Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsIMC Institute
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicIMC Institute
 
What's new in Java Message Service 2?
What's new in Java Message Service 2?What's new in Java Message Service 2?
What's new in Java Message Service 2?Sivakumar Thyagarajan
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
Javaone 2010
Javaone 2010Javaone 2010
Javaone 2010Hien Luu
 
Spring framework part 2
Spring framework part 2Spring framework part 2
Spring framework part 2Haroon Idrees
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJini Lee
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesecosio GmbH
 
Java Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP BasicJava Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP BasicIMC Institute
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCIMC Institute
 
Hibernate Tutorial
Hibernate TutorialHibernate Tutorial
Hibernate TutorialRam132
 
Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3IMC Institute
 

Was ist angesagt? (20)

Websocket 1.0
Websocket 1.0Websocket 1.0
Websocket 1.0
 
Java Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom TagsJava Web Programming [5/9] : EL, JSTL and Custom Tags
Java Web Programming [5/9] : EL, JSTL and Custom Tags
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet Basic
 
What's new in Java Message Service 2?
What's new in Java Message Service 2?What's new in Java Message Service 2?
What's new in Java Message Service 2?
 
iBATIS
iBATISiBATIS
iBATIS
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Javaone 2010
Javaone 2010Javaone 2010
Javaone 2010
 
Spring framework part 2
Spring framework part 2Spring framework part 2
Spring framework part 2
 
CDI @javaonehyderabad
CDI @javaonehyderabadCDI @javaonehyderabad
CDI @javaonehyderabad
 
JPA 2.0
JPA 2.0JPA 2.0
JPA 2.0
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
 
Jpa 2.1 Application Development
Jpa 2.1 Application DevelopmentJpa 2.1 Application Development
Jpa 2.1 Application Development
 
Java persistence api 2.1
Java persistence api 2.1Java persistence api 2.1
Java persistence api 2.1
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examples
 
hibernate with JPA
hibernate with JPAhibernate with JPA
hibernate with JPA
 
Java Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP BasicJava Web Programming [4/9] : JSP Basic
Java Web Programming [4/9] : JSP Basic
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVC
 
Hibernate Tutorial
Hibernate TutorialHibernate Tutorial
Hibernate Tutorial
 
Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3
 

Ähnlich wie JAX-RS 2.0: Key Features of the Updated RESTful Web Services API

JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and ODataAnil Allewar
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...jaxLondonConference
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Ppt on web development and this has all details
Ppt on web development and this has all detailsPpt on web development and this has all details
Ppt on web development and this has all detailsgogijoshiajmer
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Max Andersen
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasyJBug Italy
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_daviddTakashi Ito
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqelajobandesther
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web servicesnbuddharaju
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7Bruno Borges
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenchesLukas Smith
 

Ähnlich wie JAX-RS 2.0: Key Features of the Updated RESTful Web Services API (20)

JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Java EE7
Java EE7Java EE7
Java EE7
 
JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Ppt on web development and this has all details
Ppt on web development and this has all detailsPpt on web development and this has all details
Ppt on web development and this has all details
 
Intro to Laravel 4
Intro to Laravel 4Intro to Laravel 4
Intro to Laravel 4
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
 
Rest
RestRest
Rest
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web services
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 

Mehr von JAX London

Everything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityEverything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityJAX London
 
Devops with the S for Sharing - Patrick Debois
Devops with the S for Sharing - Patrick DeboisDevops with the S for Sharing - Patrick Debois
Devops with the S for Sharing - Patrick DeboisJAX London
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsJAX London
 
It's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick DeboisIt's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick DeboisJAX London
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerJAX London
 
Worse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyWorse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyJAX London
 
Java performance: What's the big deal? - Trisha Gee
Java performance: What's the big deal? - Trisha GeeJava performance: What's the big deal? - Trisha Gee
Java performance: What's the big deal? - Trisha GeeJAX London
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfJAX London
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter HiltonJAX London
 
Complexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundComplexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundJAX London
 
Why FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberWhy FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberJAX London
 
Akka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerAkka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerJAX London
 
NoSQL Smackdown 2012 : Tim Berglund
NoSQL Smackdown 2012 : Tim BerglundNoSQL Smackdown 2012 : Tim Berglund
NoSQL Smackdown 2012 : Tim BerglundJAX London
 
Closures, the next "Big Thing" in Java: Russel Winder
Closures, the next "Big Thing" in Java: Russel WinderClosures, the next "Big Thing" in Java: Russel Winder
Closures, the next "Big Thing" in Java: Russel WinderJAX London
 
Java and the machine - Martijn Verburg and Kirk Pepperdine
Java and the machine - Martijn Verburg and Kirk PepperdineJava and the machine - Martijn Verburg and Kirk Pepperdine
Java and the machine - Martijn Verburg and Kirk PepperdineJAX London
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsJAX London
 
New opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonNew opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonJAX London
 
HTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaHTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaJAX London
 
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerThe Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerJAX London
 

Mehr von JAX London (20)

Everything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexityEverything I know about software in spaghetti bolognese: managing complexity
Everything I know about software in spaghetti bolognese: managing complexity
 
Devops with the S for Sharing - Patrick Debois
Devops with the S for Sharing - Patrick DeboisDevops with the S for Sharing - Patrick Debois
Devops with the S for Sharing - Patrick Debois
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
It's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick DeboisIt's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick Debois
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael Barker
 
Worse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin HenneyWorse is better, for better or for worse - Kevlin Henney
Worse is better, for better or for worse - Kevlin Henney
 
Java performance: What's the big deal? - Trisha Gee
Java performance: What's the big deal? - Trisha GeeJava performance: What's the big deal? - Trisha Gee
Java performance: What's the big deal? - Trisha Gee
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter Hilton
 
Complexity theory and software development : Tim Berglund
Complexity theory and software development : Tim BerglundComplexity theory and software development : Tim Berglund
Complexity theory and software development : Tim Berglund
 
Why FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave GruberWhy FLOSS is a Java developer's best friend: Dave Gruber
Why FLOSS is a Java developer's best friend: Dave Gruber
 
Akka in Action: Heiko Seeburger
Akka in Action: Heiko SeeburgerAkka in Action: Heiko Seeburger
Akka in Action: Heiko Seeburger
 
NoSQL Smackdown 2012 : Tim Berglund
NoSQL Smackdown 2012 : Tim BerglundNoSQL Smackdown 2012 : Tim Berglund
NoSQL Smackdown 2012 : Tim Berglund
 
Closures, the next "Big Thing" in Java: Russel Winder
Closures, the next "Big Thing" in Java: Russel WinderClosures, the next "Big Thing" in Java: Russel Winder
Closures, the next "Big Thing" in Java: Russel Winder
 
Java and the machine - Martijn Verburg and Kirk Pepperdine
Java and the machine - Martijn Verburg and Kirk PepperdineJava and the machine - Martijn Verburg and Kirk Pepperdine
Java and the machine - Martijn Verburg and Kirk Pepperdine
 
Mongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdamsMongo DB on the JVM - Brendan McAdams
Mongo DB on the JVM - Brendan McAdams
 
New opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian RobinsonNew opportunities for connected data - Ian Robinson
New opportunities for connected data - Ian Robinson
 
HTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun GuptaHTML5 Websockets and Java - Arun Gupta
HTML5 Websockets and Java - Arun Gupta
 
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian PloskerThe Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
The Big Data Con: Why Big Data is a Problem, not a Solution - Ian Plosker
 

Kürzlich hochgeladen

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

JAX-RS 2.0: Key Features of the Updated RESTful Web Services API

  • 1. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1 JAX-RS 2.0: New and Noteworthy in RESTful Web Services API Arun Gupta Java EE & GlassFish Guy blogs.oracle.com/arungupta, @arungupta
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 2 JAX-RS - Java API for RESTful Services §  POJO-Based Resource Classes §  HTTP Centric Programming Model §  Entity Format Independence §  Container Independence §  Included in Java EE Standard annotation-driven API that aims to help developers build RESTful Web services and clients in Java
  • 3. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 3 Example: JAX-RS API @Path("/atm/{cardId}") public class AtmService { @GET @Path("/balance") @Produces("text/plain") public String balance(@PathParam("cardId") String card, @QueryParam("pin") String pin) { return Double.toString(getBalance(card, pin)); } … Built-in Serialization Resources URI Parameter Injection HTTP Method Binding
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 4 Example: JAX-RS API (contd.) … @POST @Path("/withdrawal") @Consumes("text/plain") @Produces("application/json") public Money withdraw(@PathParam("card") String card, @QueryParam("pin") String pin, String amount){ return getMoney(card, pin, amount); } } Custom Serialization
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 5 Example: JAX-RS API (contd.)
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 6 Example: JAX-RS API (contd.)
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 7 JSR-339 a.k.a. JAX-RS 2.0 §  Expert Group formed in February, 2011 –  Lead by Oracle §  Marek Potociar, Santiago Pericas-Geertsen –  13 Group members §  Jan Algermissen, Florent Benoit (OW2), Sergey Beryozkin (Talend/CXF), Adam Bien, Bill Burke (RedHat), Clinton L Combs, Bill De Hora, Markus Karg, Sastry Mallady (eBay), Wendy Raschke (IBM), Julian Reschke, Guilherme Silveira, Dionysios Synodinos §  Public Review Draft published on Sep 28, 2012 –  See JSR-339 JCP site jcp.org/en/jsr/detail?id=339
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 8 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 9 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10 Client API §  HTTP client libraries too low level §  Leveraging providers and concepts from the JAX-RS 1.x API –  E.g., MBRs and MBWs §  Proprietary APIs introduced by major JAX-RS 1.x implementations –  Need for a standard Motivation
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11 Client API // Get instance of Client Client client = ClientFactory.newClient(); // Get account balance String bal = client.target("http://.../atm/{cardId}/balance") .resolveTemplate("cardId", "111122223333") .queryParam("pin", "9876") .request("text/plain").get(String.class);
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 12 Client API // Withdraw some money Money mon = client.target("http://.../atm/{cardId}/withdrawal") .resolveTemplate("cardId", "111122223333") .queryParam("pin", "9876") .request("application/json") .post(text("50.0"), Money.class);
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13 Client API Invocation inv1 = client.target("http://.../atm/{cardId}/balance")… .request(“text/plain”).buildGet(); Invocation inv2 = client.target("http://.../atm/{cardId}/withdraw")… .request("application/json") .buildPost(text("50.0"));
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 14 Client API Collection<Invocation> invocations = Arrays.asList(inv1, inv2); Collection<Response> responses = Collections.transform( invocations, new F<Invocation, Response>() { public Response apply(Invocation inv) { return inv.invoke(); } });
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 15 Client API // Create client and register MyProvider1 Client client = ClientFactory.newClient(); client.configuration().register(MyProvider1.class); // Create atm target; inherits MyProvider1 WebTarget atm = client.target("http://.../atm"); // Register MyProvider2 atm.configuration().register(MyProvider2.class); // Create balance target; inherits MyProvider1, MyProvider2 WebTarget balance = atm.path(”{cardId}/balance"); // Register MyProvider3 balance.configuration().register(MyProvider3.class);
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 16 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 17 Common configuration - motivation client.configuration() .register(JsonMessageBodyReader.class) .register(JsonMessageBodyWriter.class) .register(JsonpInterceptor.class) .setProperty(“jsonp.callback.name”, “callback”) .setProperty(“jsonp.callback.queryParam”, “true”) ... Client-side
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 18 Common configuration - motivation public class MyApp extends javax.ws.rs.core.Application { public Set<Class<?>> getClasses() { Set<Class<?>> classes = new HashSet<…>(); … classes.add(JsonMessageBodyReader.class); classes.add(JsonMessageBodyWriter.class); classes.add(JsonpInterceptor.class); … return classes; } } Server-side
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 19 Common configuration - solution client.configuration() .register(JsonMessageBodyReader.class) .register(JsonMessageBodyWriter.class) .register(JsonpInterceptor.class) .setProperty(“jsonp.callback.name”, “callback”) .setProperty(“jsonp.callback.queryParam”, “true”) ... JsonFeature jf = new JsonFeature().enableCallbackQueryParam(); Client.configuration().register(jf); Client-side
  • 20. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 20 Common configuration - solution public Set<Class<?>> getClasses() { … classes.add(JsonMessageBodyReader.class); classes.add(JsonMessageBodyWriter.class); classes.add(JsonpInterceptor.class); … } public Set<Class<?>> getClasses() { … classes.add(JsonFeature.class); … } Server-side
  • 21. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 21 Common configuration public interface Configurable { Map<String, Object> getProperties(); Object getProperty(String name); Configurable setProperties(Map<String, ?> properties); Configurable setProperty(String name, Object value); Collection<Feature> getFeatures(); Set<Class<?>> getProviderClasses(); Set<Object> getProviderInstances(); Configurable register(...); ... }
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 22 Common configuration public interface Feature { boolean configure(Configurable configurable); }
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 23 A Feature example public void JsonFeature implements Feature { public boolean configure(Configurable config) { config.register(JsonMessageBodyReader.class) .register(JsonMessageBodyWriter.class) .register(JsonpInterceptor.class) .setProperty(CALLBACK_NAME, calbackName) .setProperty(USE_QUERY_PARAM, useQueryParam); return true; } }
  • 24. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 24 Dynamic Feature public interface DynamicFeature { void configure(ResourceInfo ri, Configurable configurable); } public interface ResourceInfo { Method getResourceMethod(); Class<?> getResourceClass(); } Server-side only
  • 25. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 25 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 26. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 26 Async Processing §  Server API support –  Off-load I/O container threads §  Long-running operations –  Efficient asynchronous event processing §  Suspend while waiting for an event §  Resume when event arrives –  Leverage Servlet 3.x async support (if available) §  Client API support –  Asynchronous request invocation API §  Future<RESPONSE>, InvocationCallback<RESPONSE>  
  • 27. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 27 Async Processing: Server-side @Path("/async/longRunning") public class MyResource { @GET public void longRunningOp(@Suspended AsyncResponse ar) { ar.setTimeoutHandler(new MyTimoutHandler()); ar.setTimeout(15, SECONDS); Executors.newSingleThreadExecutor().submit(new Runnable() { public void run() { … ar.resume(result); } }); } }
  • 28. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 28 Async Processing: Server-side public interface AsyncResponse { public void resume(Object/Throwable response); public void cancel(); public void cancel(int/Date retryAfter); public boolean isSuspended(); public boolean isCancelled(); public boolean isDone(); public void setTimeout(long time, TimeUnit unit); public void setTimeoutHandler(TimeoutHandler handler); public boolean register(Class<?> callback); public boolean[] register(Class<?> callback, Class<?>... callbacks); public boolean register(Object callback); public boolean[] register(Object callback, Object... callbacks); }
  • 29. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29 Async Processing: Server-side @Target({ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Suspended { } public interface TimeoutHandler { void handleTimeout(AsyncResponse asyncResponse); }
  • 30. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 30 Async Processing: Server-side public interface ResumeCallback { public void onResume(AsyncResponse resuming, Response response); public void onResume(AsyncResponse resuming, Throwable error); } public interface CompletionCallback { public void onComplete(); public void onError(Throwable throwable); } public interface ConnectionCallback { public void onDisconnect(AsyncResponse disconnected); }
  • 31. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 31 Async Processing: Client-side WebTarget target = client.target("http://.../balance”)… // Start async call and register callback Future<?> handle = target.request().async().get( new InvocationCallback<String>() { void complete(String balance) { … } void failed(InvocationException e) { … } }); // After waiting for too long… if (!handle.isDone()) handle.cancel(true);
  • 32. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 32 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 33. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 33 Filters & Interceptors §  Customize JAX-RS request/response processing –  Use Cases: Logging, Compression, Security, Etc. §  Introduced for client and server APIs §  Replace existing proprietary support –  Provided by most JAX-RS 1.x implementations §  All using slightly different types or semantics Motivation
  • 34. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 34 Filters & Interceptors §  Non-wrapping filter chain –  Filters do not invoke next filter in the chain directly –  managed by the JAX-RS runtime §  Each filter decides to proceed or break the chain Filter each incoming/outgoing message §  Request è Request –  ContainerRequestFilter,   ClientRequestFilter   §  Response è Response –  ContainerResponseFilter,   ClientResponseFilter §  Server-side specialties –  @PreMatching,  DynamicFeature
  • 35. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 35 Filters & Interceptors public class RequestLoggingFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) { log(requestContext); // non-wrapping => returns without invoking the next filter } ... } A Logging Filter Example
  • 36. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36 Filters & Interceptors §  Invoked ONLY when/if entity processing occurs –  Performance boost §  Wrapping interceptor chain –  Each interceptor invokes the next one in the chain via context.proceed()   Intercept entity providers §  MessageBodyReader interceptor –  ReaderInterceptor interface §  MessageBodyWriter interceptor –  WriterInterceptor interface
  • 37. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 37 Filters & Interceptors public class GzipInterceptor implements ReaderInterceptor { @Override Object aroundReadFrom(ReaderInterceptorContext ctx) { InputStream old = ctx.getInputStream(); ctx.setInputStream(new GZIPInputStream(old)); // wrapping => invokes the next interceptor Object entity = ctx.proceed(); ctx.setInputStream(old); return entity; } } A GZip Reader Interceptor Example
  • 38. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 38 Application Filters & Interceptors Request Filter Filter Network Transport … … Response Filter Filter write(…) Writer Interceptor … MBW read(…) - optional … MBR Writer Interceptor Reader Interceptor Reader Interceptor
  • 39. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 39 Response Application Filters & Interceptors Filter Filter Network … Response Filter Filter write(…) … MBW Writer Interceptor Writer Interceptor Filter Filter … Request Request read(…) - optional Reader Interceptor … MBR Reader Interceptor Filter Filter Resource Matching @PreMatching
  • 40. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 40 Bindings & Priorities §  Binding –  Associating filters and interceptors with resource methods –  Server-side concept §  Priority –  Declaring relative position in the execution chain –  @BindingPriority(int  priority)   §  Shared concept by filters and interceptors Scoped Binding Global Binding Static @NameBinding (@Qualifier?) Default @PreMatching Dynamic DynamicFeature N/A
  • 41. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 41 Bindings @NameBinding // or @Qualifier ? @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(value = RetentionPolicy.RUNTIME) public @interface Logged {} @Provider @Logged @BindingPriority(USER) public class LoggingFilter implements ContainerRequestFilter, ContainerResponseFilter { … }
  • 42. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 42 Bindings @Path("/greet/{name}") @Produces("text/plain") public class MyResourceClass { @Logged @GET public String hello(@PathParam("name") String name) { return "Hello " + name; } }
  • 43. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 43 A DynamicFeature example public void SecurityFeature implements DynamicFeature { public boolean configure(ResourceInfo ri, Configurable config) { String[] roles = getRolesAllowed(ri); if (roles != null) { config.register(new RolesAllowedFilter(roles)); } } … } Server-side only
  • 44. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 44 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 45. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 45 Hypermedia §  REST principles –  Identifiers and Links –  HATEOAS (Hypermedia As The Engine Of App State) §  Link types: –  Structural Links –  Transitional Links
  • 46. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 46 Hypermedia Link: <http://.../orders/1/ship>; rel=ship, <http://.../orders/1/cancel>; rel=cancel ... <order id="1"> <customer>http://.../customers/11</customer> <address>http://.../customers/11/address/1</address> <items> <item> <product>http://.../products/111</product> <quantity>2</quantity> </item> <items> ... </order> Transitional Links Structural Links
  • 47. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 47 Hypermedia §  Link and LinkBuilder classes –  RFC 5988: Web Linking §  Support for Link in ResponseBuilder and filters   –  Transitional links (headers) §  Support for manual structural links –  Via Link.JaxbAdapter & Link.JaxbLink §  Create a resource target from a Link in Client API
  • 48. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 48 Hypermedia // Producer API (server-side) Link self = Link.fromResourceMethod(MyResource.class, ”handleGet”) .build(); Link update = Link.fromResourceMethod(MyResource.class, “handlePost”) .rel(”update”) .build(); ... Response res = Response.ok(order) .link("http://.../orders/1/ship", "ship") .links(self, update) .build();
  • 49. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 49 Hypermedia Response order = client.target(…).request("application/xml").get(); // Consumer API (client-side) Link shipmentLink = order.getLink(“ship”); if (shipmentLink != null) { Response shipment = client.target(shipmentLink).post(null); … }
  • 50. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 50 JAX-RS 2.0 § Client API § Common configuration § Asynchronous processing § Filters § Interceptors § Hypermedia support § Server-side content negotiation
  • 51. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 51 Server Side Conneg GET http://.../widgets2 Accept: text/*; q=1 … Path("widgets2") public class WidgetsResource2 { @GET @Produces("text/plain", "text/html") public Widgets getWidget() {...} }
  • 52. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 52 Server Side Conneg GET http://.../widgets2 Accept: text/*; q=1 … Path("widgets2") public class WidgetsResource2 { @GET @Produces("text/plain; qs=0.5", "text/html; qs=0.75") public Widgets getWidget() {...} }
  • 53. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 53 JAX-RS 2.0 Summary §  Major new features –  Client API, Filters & Interceptors, Asynchronous Resources, Hypermedia §  Many minor API improvements and extensions –  Request / Response, URI builder, String Converters, @BeanParam, MultivaluedHashMap, GenericType, … §  Improved TCK coverage = improved portability –  ~350 tests in JAX-RS 1.x, ~1700 tests in JAX-RS 2.0
  • 54. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 54 <a href=“…” >JAX-RS 2.0</a> §  Project web site jax-rs-spec.java.net §  Users mailing list users@jax-rs-spec.java.net §  JSR-339 site jcp.org/en/jsr/detail?id=339 –  Latest specification text draft §  java.net/projects/jax-rs-spec/sources/git/content/spec/spec.pdf –  Latest API snapshot §  jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/index.html
  • 55. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 55 <a href=“…” >Jersey 2.0</a> §  Project web site jersey.java.net §  Users mailing list users@jersey.java.net –  Latest users guide §  http://jersey.java.net/nonav/documentation/snapshot/index.html –  Latest API documentation §  http://jersey.java.net/nonav/apidocs/snapshot/jersey/index.html
  • 56. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 56
  • 57. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 57
  • 58. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 58 JAX-RS 2.0 § DI (JSR-330) Integration § Bean Validation § Improved Java EE Security Support § Presentation Layer § High-level Client API
  • 59. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 59 Dependency Injection Integration §  Support Java Dependency Injection API (JSR-330) –  Support  @Inject  and  @Qualifier ? –  @Qualifier  as a replacement for  @NamedBinding  ? –  Provider vs.  ContextResolver ? –  Support DI (JSR-330) or CDI (JSR-299)? §  Issues –  Interference with CDI providers –  EG does not see enough added value for DI §  DI-style injection support deferred
  • 60. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 60 Dependency Injection Integration §  Java EE Deployments –  Tight CDI integration makes sense (unification of Java EE component model) §  Java SE Deployments –  DI provides all the required features –  CDI is too heavy-weight §  Many redundant features –  method interceptors, decorators, stereotypes … §  Additional limitations put on managed components Support DI (JSR-330) or CDI (JSR-299)?
  • 61. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 61 Bean Validation §  Dropped from JAX-RS 2.0 Public Review –  Difficulty aligning schedules §  Still supported via CDI 1.1 –  JAX-RS resource class must be CDI bean –  BV 1.1 now supports method validation §  May revisit current plan post Java EE 7
  • 62. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 62 More Topics… §  Improved Java EE security support –  @RolesAllowed, … –  SecurityContext.authenticate(…) §  Pluggable Views –  Completes the MVC pattern §  High-level client API –  Hard to design it to be RESTful –  Jersey 2 provides an experimental support –  Don’t want to end-up with an RPC-style API