资源预览内容
第1页 / 共50页
第2页 / 共50页
第3页 / 共50页
第4页 / 共50页
第5页 / 共50页
第6页 / 共50页
第7页 / 共50页
第8页 / 共50页
第9页 / 共50页
第10页 / 共50页
亲,该文档总共50页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1,Jakarta EE 和 MicroProfile演进趋势分析,IT evolution,2,Agile ,16,Dependent RegisterRestClient RegisterProvider(UnknownUrlExceptionMapper.class) Path(/properties) public interface SystemClient GET Produces(MediaType.APPLICATION_JSON) public Properties getProperties() throws UnknownUrlException, ProcessingException; ,io.openliberty.guides.inventory.client.SystemClient/mp-rest/url=http:/localhost:9080/system,CDI Contexts Dependency Injection,B,A,public class InventoryManager Inject private SystemClient systemClient; ,17,Equivalent to Spring Injection Autowired,20,JSON-B ,public class InventoryList private List systems; public InventoryList(List systems) this.systems = systems; public List getSystems() return systems; public int getTotal() return systems.size(); ,21,Handling 100s of collaborating and frequently evolving services requires new APIs,22,Eclipse MicroProfile,microprofile.io,3,2,MicroProfile OpenAPI,A,B,openapi: 3.0.0 info: title: Inventory App description: App for storing JVM system properties of various hosts. license: name: Eclipse Public License - v 1.0 url: https:/www.eclipse.org/legal/epl-v10.html version: 1.0 servers: - url: http:/localhost:port description: Simple Open Liberty. variables: port: description: Server HTTP port. default: 9080 paths: /inventory/systems: get: summary: List inventory contents. description: Returns the currently stored host:properties pairs in the inventory. operationId: listContents responses: 200: description: host:properties pairs stored in the inventory. content: application/json: schema: $ref:,http:/localhost:9080/openapi/ui,GET Produces(MediaType.APPLICATION_JSON) APIResponse( responseCode = 200, description = host:properties pairs stored in the inventory., content = Content( mediaType = application/json, schema = Schema( type = SchemaType.OBJECT, implementation = InventoryList.class) Operation( summary = List inventory contents., description = Returns the stored host:properties pairs.) public InventoryList listContents() return manager.list(); ,MicroProfile JWT,A,B,GET RolesAllowed( admin, user ) Path(hostname) Produces(MediaType.APPLICATION_JSON) public Response getPropertiesForHost(PathParam(hostname) String hostname, Context HttpHeaders httpHeaders) ,22,MicroProfile Fault Tolerance,A,B,Fallback(fallbackMethod = fallbackForGet) public Properties get(String hostname) throws IOException return invUtils.getProperties(hostname); ,23,A,MicroProfile Config,B,Inject ConfigProperty(name = io_openliberty_guides_inventory_inMaintenance) private Provider inMaintenance;,config_ordinal=100 io_openliberty_guides_inventory_inMaintenance=fals e, config_ordinal:150, io_openliberty_guides_inventory_inMaintenance:true ,24,Handling 100s of collaborating services requires a strong operations focus,25,Eclipse MicroProfile,microprofile.io,26,MicroProfile Health,A,B,Health ApplicationScoped public class InventoryResource implements HealthCheck . public boolean isHealthy() . Override public HealthCheckResponse call() if (!isHealthy() return HealthCheckResponse.named(“InventoryResource”).withData().down().build(); return HealthCheckResponse.named(“InventoryResource”).withData().up().build(); ,27,MicroProfile Metrics,A,B,Timed(name = inventoryPropertiesRequestTime, absolute = true, description = Time needed to get the properties of + a system from the given hostname) public Properties get(String hostname) return invUtils.getProperties(hostname); ,28,MicroProfile OpenTracing,A,B,Traced(value = true, operationName = InventoryManager.list) public InventoryList list() return new InventoryList(systems); ,JAX-RS methods are automatically traced by default,29,ow to get star,32,https:/openliberty.io/guides,Hhttps:/start.microprofile.ioted?,30,Meanwhile,2017 - 2018,3333,Jakarta EE vs Java EE,Compare and Contrast Content, Processes, Participants, Deliverables, etc,Think 2019 / Session 2138 / February 15, 2019 / 2019 IBM Corporation,32,34,Roadmap,Moving material from Oracle to Eclipse Java EE 8 Specifications Java EE 8 APIs Java EE 8 RIs Java EE 8 TCKs,35,33,36,Java EE 8,Oracle GlassFish 5.0,Java EE 8,Jakarta EE 8,36,Sources, TCKs, Docs,We are getting closer to Jakarta EE .,Eclipse GlassFish 5.1,Eclipse GlassFish 5.2,Jakarta EE 9,Eclipse GlassFish 5.X,Community-Driven Innovation with new specs!,29-JAN-19,37,Roadmap,Think 2019 / Session 2138 / February 15, 2019 / 2019 IBM Corporation,37,https:/www.eclipse.org/ee4j/status.php 20% - Project Proposed 40% - Project Accepted and Provisioned 60% - Initial Code Contribution to Eclipse 80% - Build / Test in Github and Jenkins 100% - Project has First Release!,*As of Feb 06, 2019,2.Several Compatible Implementations will be Jakarta EE 8 compliant using Jakarta EE 8 C
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号