The document provides an overview of new concepts and features in Java EE 6, including profiles like Web Profile 1.0 that define subsets of the platform, new specifications like Managed Beans 1.0 and Interceptors 1.1, and updates to existing specifications such as EJB 3.1, JPA 2.0, Servlet 3.0, and JSF 2.0. It discusses concepts like pruning of specifications, portable JNDI names, embeddable containers, and the move of Facelets as the preferred view definition language for JSF.
Antonio is a Java developer and knows nothing about user interfaces. He uses his Mac to develop Java EE micro-services, runs them with WildFly Swarm, packages in the Docker and exposes beautiful REST APIs.
Sébastien is a TypeScript developer and knows nothing about Java. Employed at Microsoft, he uses his PC to develop beautiful user interfaces with TypeScript and Angular to invoke the services REST exposed by Antonio.
This university is intended for Java and Angular developers who want to learn how to use a Angular / TypeScript front-end with a Java / MicroProfile back-end. It is composed of two parts:
1) More theoretical: presentation of the Enterprise Micro Profile, WildFly Swarm, the TypeScript syntax and Angular.
2) More practical: development of an Angular application using several REST back-ends (JAX-RS, JSon: API, Swagger, Cors, Hateoas, ETag, JWT, Traeffik).
This 50 minutes talk covers the novelties of Java EE 7 (easier to understand if you already know Java EE 6). It comes from the talk I gave with Arun Gupta at JavaOne 2013
Are Websphere or Weblogic appropriate for your project? Too big" ? Do Jetty or Tomcat actually meet your needs? Too "small"?
Neither too big nor too small. What you need is "just enough app server" to support only the subset of APIs and services your application needs.
Java 9 introduces modules to the Java programming language and its runtime. Despite this feature being optional, due to the modularization of the standard library existing applications might behave differently when running on a version 9 JVM. Furthermore, because of changes in the runtime, existing libraries and frameworks might not yet correctly process your modularized code. As a result, updating to a Java 9 VM and taking Java 9 into brings its challanges.
This talk discusses the practical implications of module boundaries and analyzes new limitations Java 9 imposes on the reflection API. This talk explains how reflection is used in popular frameworks like Spring and Hibernate and explains why existing applications might break or change their behavior when facing modularized code. Finally, this talk showcases alternatives to now failing Java programming patterns and weights their robustness with regard to the Java releases 10 and upward.
The presenter is an active contributor to open source and helped to migrate many popular Java libraries to supporting Java 9. As a consequence, he as been working with Java 9 for almost two years.
Antonio is a Java developer and knows nothing about user interfaces. He uses his Mac to develop Java EE micro-services, runs them with WildFly Swarm, packages in the Docker and exposes beautiful REST APIs.
Sébastien is a TypeScript developer and knows nothing about Java. Employed at Microsoft, he uses his PC to develop beautiful user interfaces with TypeScript and Angular to invoke the services REST exposed by Antonio.
This university is intended for Java and Angular developers who want to learn how to use a Angular / TypeScript front-end with a Java / MicroProfile back-end. It is composed of two parts:
1) More theoretical: presentation of the Enterprise Micro Profile, WildFly Swarm, the TypeScript syntax and Angular.
2) More practical: development of an Angular application using several REST back-ends (JAX-RS, JSon: API, Swagger, Cors, Hateoas, ETag, JWT, Traeffik).
This 50 minutes talk covers the novelties of Java EE 7 (easier to understand if you already know Java EE 6). It comes from the talk I gave with Arun Gupta at JavaOne 2013
Are Websphere or Weblogic appropriate for your project? Too big" ? Do Jetty or Tomcat actually meet your needs? Too "small"?
Neither too big nor too small. What you need is "just enough app server" to support only the subset of APIs and services your application needs.
Java 9 introduces modules to the Java programming language and its runtime. Despite this feature being optional, due to the modularization of the standard library existing applications might behave differently when running on a version 9 JVM. Furthermore, because of changes in the runtime, existing libraries and frameworks might not yet correctly process your modularized code. As a result, updating to a Java 9 VM and taking Java 9 into brings its challanges.
This talk discusses the practical implications of module boundaries and analyzes new limitations Java 9 imposes on the reflection API. This talk explains how reflection is used in popular frameworks like Spring and Hibernate and explains why existing applications might break or change their behavior when facing modularized code. Finally, this talk showcases alternatives to now failing Java programming patterns and weights their robustness with regard to the Java releases 10 and upward.
The presenter is an active contributor to open source and helped to migrate many popular Java libraries to supporting Java 9. As a consequence, he as been working with Java 9 for almost two years.
How to build to do app using vue composition api and vuex 4 with typescriptKaty Slemon
In this tutorial, we will build a to-do app using Vue Composition API & Vuex 4 with Typescript. We will learn and explore Composition API & Options API as well
Making Java more dynamic: runtime code generation for the JVMRafael Winterhalter
While Java’s strict type system is a great help for avoiding programming errors, it also takes away some of the flexibility that developers appreciate when using dynamic languages. By using runtime code generation, it is possible to bring some of this flexibility back to the Java virtual machine. For this reason, runtime code generation is widely used by many state-of-the-art Java frameworks for implementing POJO-centric APIs but it also opens the door to assembling more modular applications. This presentation offers an introduction to the complex of runtime code generation and its use on the Java platform. Furthermore, it discusses the up- and downsides of several code generation libraries such as ASM, Javassist, cglib and Byte Buddy.
Async task, threads, pools, and executors oh my!Stacy Devino
http://360andev.com/sessions/100-async-task-threads-pools-and-executors/
Frome 360 AnDev conference
There are many ways to use Threads and in the multithreaded world in which we live, it can be confusing when, where, and how to use these functions correctly. Still, that assumes you know what they all mean and how to manipulate them. Novices and Experts welcome as there are many schools of thought, but we will explore them all together.
Don’t worry, we have you covered.
Animated Version : but.ly/asyncThread
Slides for a talk at the Seattle Java User Group about building a workflow management application for a biomedical lab on top of the OSGi module system and the Eclipse Rich Client Platform.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
How to build to do app using vue composition api and vuex 4 with typescriptKaty Slemon
In this tutorial, we will build a to-do app using Vue Composition API & Vuex 4 with Typescript. We will learn and explore Composition API & Options API as well
Making Java more dynamic: runtime code generation for the JVMRafael Winterhalter
While Java’s strict type system is a great help for avoiding programming errors, it also takes away some of the flexibility that developers appreciate when using dynamic languages. By using runtime code generation, it is possible to bring some of this flexibility back to the Java virtual machine. For this reason, runtime code generation is widely used by many state-of-the-art Java frameworks for implementing POJO-centric APIs but it also opens the door to assembling more modular applications. This presentation offers an introduction to the complex of runtime code generation and its use on the Java platform. Furthermore, it discusses the up- and downsides of several code generation libraries such as ASM, Javassist, cglib and Byte Buddy.
Async task, threads, pools, and executors oh my!Stacy Devino
http://360andev.com/sessions/100-async-task-threads-pools-and-executors/
Frome 360 AnDev conference
There are many ways to use Threads and in the multithreaded world in which we live, it can be confusing when, where, and how to use these functions correctly. Still, that assumes you know what they all mean and how to manipulate them. Novices and Experts welcome as there are many schools of thought, but we will explore them all together.
Don’t worry, we have you covered.
Animated Version : but.ly/asyncThread
Slides for a talk at the Seattle Java User Group about building a workflow management application for a biomedical lab on top of the OSGi module system and the Eclipse Rich Client Platform.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
Happy Java 8 release! But for Java EE 7? Is the SE 8 works for EE 7? this slide shows the current situation of applying SE 8 to EE 7. This is the revised version of "JJUG CCC 2014 Spring" session, for the "Java 8 workshop at Fukuoka".
This slides give you an overview of the technical challgens that Java EE application servers have faced to reinvent themselves. From monolithic to jigsaw puzzles, app servers are not the burden developpers use to use anymore
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Hirofumi Iwasaki
Financial companies need Java EE to power its business today. Rakuten Card, one of the largest credit card companies in Japan, adopted Java EE 6 for its online systems rearchitecture. You can learn why we choose Java EE, and our experiences and lessons we learned. This is the first disclosing of a large credit card company in Japan sharing their story.
How to start such a big project? Why we choose it, how we selected the in house development policies, educated ourselves, and developed the additional libraries? How to launch within only six months? What is the key factor driving them as 24/7 critical real financial systems successfully? How to migrate to EE 7 in the future? We’ll answer these questions and any that you may have.
This version is the exclusive session for JJUG CCC Fall 2014 in Japan, binding both JavaOne and OOW 2014 sessions.
As you know, Java EE is old-fashioned, heavyweight, cumbersome, and made mostly of boilerplate code. Who would develop a modern Web application with such a technological stack? Who would start an heavy application server, deploy some EJBs, and wait ages for integration tests to run—only to end up with an ugly Web page? You?
After a few slides and with the help of JBoss Forge I write a Java EE 7 app with an HTML5 front end with responsive design, sexy graphical components, manageable REST interfaces, and transactional databases.
Case Study of Financial Web System Development and Operations with Oracle Web...Hirofumi Iwasaki
To stay ahead of the technology curve, financial companies require the power, flexibility, and scalability of latest enterprise technologies for 24/7 services. Rakuten Card, one of the largest credit card companies in Japan, recently renewed its web front-end systems utilizing Java EE. This session provides answers to the following questions: Among the myriad of available technologies, why did it choose Oracle WebLogic and Oracle Exadata, managed by Oracle Enterprise Manager? How did it drive this huge project to completion in only six months, using only in-house development? What were the key success factors in launching and operating this mission-critical service? Hear about its extraordinary improvement results and how its selections are effective for financial enterprise systems.
Many enterprise systems build at 2000 - 2010 uses J2EE old specifications with Struts web framework. But nowadays J2EE improved as Java EE, with standard web framework JSF 2. With this slides you can learn how to migrate old-styled J2EE + Struts systems to sophisticated Java EE with JSF 2 specification. This slides was used in Java Day Tokyo 2014 C4 window, presented by the author. And some slides is specialized for Japanese enterprise systems, but the theme is very standard and for almost all J2EE users in the world.
Consideration points for migrating from older pre-J2EE, J2EE 1.2-1.4, Java EE 5-6 to EE 7, and migration points especially for web front-end systems and back-ends. JSP to JSF, EJB to CDI with migration procedure details. Slide materials on Java Day Tokyo 2016.
Real world batch implementations and frameworks.
These slides explores various ways in which batch processing can implemented with Java EE and other frameworks. It includes pro and cons of batch implementations with JCL, prepared statements, CDI, JSR 352 and embedded EJB containers. It helps to understand when to use JSR 352 and when not to, the benefits of using an embedded EJB container for batch processing, and the best practices to follow when designing batch processes.
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Red Hat Developers
JBoss EAP7 brings support for the most recent industry standards and technologies, including Java EE7, the latest edition of the premier enterprise development standard. This session will provide an overview of the major additions to Java EE7, and how your team can use these capabilities on the advanced EAP7 runtime to produce better applications with less code.
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
32. Packaged in a war Local Session Bean Injection CMT / BMT Interceptors Security Message Driven Beans EJB Web Service Endpoint RMI/IIOP Interoperability Remote interface EJB 2.x Timer service CMP / BMP
65. Criteria API EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query. from (Book.class); query. select (book) .where (cb.equal(book. get("description") , "")); SELECT b FROM Book b WHERE b.description IS EMPTY
66. Criteria API (Type-safe) EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query. from (Book.class); query. select (book) . where (cb.isEmpty(book.get( Book_ .description))); Statically generated JPA 2.0 MetaModel
67. Criteria API (Builder pattern) EntityManager em = ...; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Book> query = cb.createQuery(Book.class); Root<Book> book = query. from (Book.class); query. select (book) . where (cb.isEmpty(book.get( Book_ .description))) .orderBy (...) .distinct(true) .having (...) .groupBy (...); List<Book> books = em.createQuery (query).getResultList();
101. Remote interfaces are now optional ! @Stateless public class HelloBean { public String sayHello() { return "Hello world!"; } }
102. Packaging in a war foo.ear lib/foo_common.jar foo_web.war foo_ejb.jar foo.war WEB-INF/classes com/acme/ Foo .class com/acme/ FooServlet .class com/acme/ FooEJB .class
103.
104.
105.
106. Asynchronous calls @Stateless public class OrderBean { public void createOrder() { Order order = persistOrder(); sendEmail(order); // fire and forget } public Order persistOrder() {...} @Asynchronous public void sendEmail(Order order) {...} }
167. Hello World @Path("/helloworld") public class HelloWorldResource { @GET @Produces("text/plain") public String sayHello() { return "Hello World"; } } GET http://example.com/helloworld
168. Hello World GET /helloworld HTTP/1.1 Host: example.com Accept: text/plain HTTP/1.1 200 OK Date: Wed, 12 Nov 2008 16:41:58 GMT Server: GlassFish v3 Content-Type: text/plain ; charset=UTF-8 Hello World Request Response
169. Different Mime Types @Path("/helloworld") public class HelloWorldResource { @GET @Produces("image/jpeg") public byte[] paintHello() { ... @GET @Produces("text/plain") public String displayHello() { ... @POST @Consumes("text/xml") public void updateHello(String xml) { ... }
170. Parameters & EJBs @Path("/users/ {userId} ") @Stateless public class UserResource { @PersistenceContext EntityManage em; @GET @Produces("text/xml") public String getUser( @PathParam("userId" ) String id){ User u = em.find(User.class, id) ... } }
193. Qualifier Annotation @Target({TYPE,METHOD,PARAMETER,FIELD}) @Retention(RUNTIME) @Documented @Qualifier public @interface Premium {…} @Premium // my own qualifier (see above) public class SpecialCustomer implements Customer { public void buy() {…} }
194. Injection with qualifier @Inject @Premium Customer cust; qualifier (user-defined label) i.e. « which one? » type injection point
217. Noncommercial — You may not use this work for commercial purposes.
218. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.