The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !!...
Transcript of The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !!...
![Page 1: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/1.jpg)
The Next Generation
Prabhat JhaPrincipal Engineer
![Page 2: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/2.jpg)
What do you wish you had in an Open Source JEE Application Server?
![Page 3: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/3.jpg)
Faster Startup Time?
![Page 4: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/4.jpg)
Lighter Memory Footprint?
![Page 5: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/5.jpg)
Easier Administration?
![Page 6: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/6.jpg)
![Page 7: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/7.jpg)
7 Reasons To Love AS7...
![Page 8: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/8.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
![Page 9: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/9.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
![Page 10: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/10.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
• Modular core
![Page 11: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/11.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
• Modular core• Hot, parallel deployment
![Page 12: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/12.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
• Modular core• Hot, parallel deployment
• Elegant administration
![Page 13: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/13.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
• Modular core• Hot, parallel deployment
• Elegant administration• Domain management
![Page 14: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/14.jpg)
7 Reasons To Love AS7...
• Blazing fast startup time
• Lightweight
• Modular core• Hot, parallel deployment
• Elegant administration• Domain management
• First class components
![Page 15: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/15.jpg)
Bonus for Austin JUG
• Testable by design :-)
![Page 16: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/16.jpg)
Details
![Page 17: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/17.jpg)
Blazing Fast Startup Time
![Page 18: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/18.jpg)
Lightweight Footprint
![Page 19: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/19.jpg)
New Possibilities
• Execute an entire Java EE container in a unit test !
• Use an appserver VM per application
• Run in constrained environments (light cloud, plug computers, mobile devices)
• Develop faster than you ever have before.
• Run multiple staging servers on your laptop.
![Page 20: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/20.jpg)
JBoss AS7 Architecture
![Page 21: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/21.jpg)
Modular Core
Isolated Classes vs.One Size Fits All!
![Page 22: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/22.jpg)
JBoss Modules• Provides extremely fast modular class loading
– O(1) Dependency resolution
– Concurrent CL (lockless in most VMs)
• “Pure” modular class loading– Modules only see what they import (includes JDK classes!)
• External module definitions– Don’t have to break open the JAR
• Dynamic– Modules can be redefined
• Extensible– JBoss OSGi implemented on modules
![Page 23: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/23.jpg)
OLD: HierarchicalClassloading
NEW:Modular
Classloading
![Page 24: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/24.jpg)
User Deployments
• User deployments are modules too
• Sets up dependencies on some modules automatically (e.g. JPA, Hibernate, WebServices)
• The user can also set up their own dependencies on app server modules
![Page 25: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/25.jpg)
Hot, Parallel Deployment
Services Load Concurrently!
![Page 26: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/26.jpg)
Services
• In AS7 almost everything is a service
• Services are objects that can be started and stopped
• Services can have dependencies on other services
• When all a services dependencies are satisfied it will attempt to start
• If a dependency going to be stopped, then MSC will stop all dependent services first
• Services can inject dependent services
![Page 27: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/27.jpg)
Elegant Administration
![Page 28: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/28.jpg)
First Class Components
• Infinispan
• CDI/Weld
• HornetQ• Hibernate
• JSF
• OSGI
• PicketBox
![Page 29: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/29.jpg)
EAP 6 – Test Drive Now!
![Page 30: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/30.jpg)
• Fast and Lightweight
• Supports domain (multi-node) management
• Multiple consistent management interfaces
• CLI, Java API, HTTP API, Console
• Unified, user-focused configuration
• Modular
• Only APIs, no AS implementation exposure
• True isolation
Key Features
![Page 31: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/31.jpg)
Two Operational Models
Standalone• Traditional JBoss single JVM server
• Management facilities IN-VM
Domain• Multi-JVM, multi-server model
• Management coordinated by Domain Controller Process
• Multiple server instances (JVMs) per Host
• Full lifecycle managed by Process Controller
![Page 32: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/32.jpg)
Standalone Mode
• Standalone is a single AS process for use in development, where the additional management functionality is not required
• Provides a similar development experience to previous versions of the AS, allowing for a deployment to be dropped in the deployments folder and automatically deployed
• Can still be managed by the same tools and API's as domain mode
![Page 33: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/33.jpg)
Standalone Mode
Demo
![Page 34: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/34.jpg)
Domain Mode
• Easy management of multiple AS instances
• Managed from a single point, all have access to the same domain configuration
• Allows for management and configuration updates to be pushed out to all servers
• Domain Mode has three separate processes:– Process Controller
– Host Controller
– Server Instance
![Page 35: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/35.jpg)
Domain Mode Architecture
![Page 36: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/36.jpg)
Domain Mode ..
• Multi-server management as a core part of AS 7 /EAP 6 itself– Start/quiesce/stop servers– Rolling deployment to a set of servers– Roll a config change out of a set of servers– Roll back changes
![Page 37: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/37.jpg)
Domain Model Concepts
• Subsystem : a particular set of capabilities that extend the app server core
– WebServer, Transaction Manager, EJB3
• Profile: the set of subsystem a server or a group of server runs
– Change your profile to expand or narrow the capabilities of your servers
![Page 38: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/38.jpg)
Management
• ONE configuration file – standalone.xml / domain.xml
• Management API that allows for persistent changes to the configuration
• Management API can manage all servers in the domain
• Management console to provide user friendly management in a web browser
• Command line tool for use in scripts
![Page 39: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/39.jpg)
Management via Configuration
![Page 40: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/40.jpg)
Management via API
![Page 41: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/41.jpg)
Management via CLI
• Scriptable command line management tool
• Uses the management API internally
• Allows access to high level user friendly commands:
create-jms-queue –-name testQueue
• Also allows direct access to the domain model, giving access to the full functionality of the management API
![Page 42: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/42.jpg)
Testing with Arquillian
• AS7 supports easy testing with ArquillIan
• Arquillian is used both in the internal test suite and by end users to test their applications
• Combined with the fast startup speed of AS7 testing in the container is just as easy as running normal JUnit tests.
![Page 43: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/43.jpg)
High Octane Development | Automated Testing for Java EE6 | Andrew Lee Rubinger
A simple API for constructing archives as Java objects:
WebArchive archive = ShrinkWrap.create(WebArchive.class,”archive.war”) .addClasses(MyClass.class,MyOtherClass.class, WecomeServlet.class) .addAsResource("mystuff.properties");myServer.deploy(archive); // And done.
![Page 44: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/44.jpg)
Java EE 6 Intro
• Extensibility
• Profiles
– Subsets of “full” EE platform
– Web Profile
• Pruning
– CMP, JAX-RPC, JAXR, JSR-88 are “pruned” in EE6
• New Technology & Improvements to Existing
– Dependency Injection, CDI, Servlet 3, JPA 2, JSF 2, JAX-RS, Bean Validation
![Page 45: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/45.jpg)
Servlet 3
• Ease of Development
– Annotations
– Zero configuration in XML for the most part.
• Web framework pluggability
– Programmatic access to web.xml
– Dynamic changes to configuration of webapp
• Async and Commet support
– Non blocking input and output
– Delay request handing
– Delay response close
•
![Page 46: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/46.jpg)
Servlet 3
@WebServlet@WebServlet
@WebServlet("/report")
public class ReportServlet extends HttpServlet
@WebFilter@WebFilter
@WebFilter(filterName = "TimeOfDayFilter",
urlPatterns = {"/*"},
initParams = {
@WebInitParam(name = "report", value = "dev")})
public class TimeOfDayFilter implements Filter {
@HttpConstraint @HttpMethodConstraint @MultipartConfig@HttpConstraint @HttpMethodConstraint @MultipartConfig
@ServletSecurity @WebInitParam @WebListener@ServletSecurity @WebInitParam @WebListener
![Page 47: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/47.jpg)
JSF 2
• Ajax
• Easy component creation
• Bookmarkable URLs
• Templating (think Facelets)
![Page 48: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/48.jpg)
JPA 2
• O/R mapping enhancements
– Embedded objects, collections, ordered lists
• Query and Entity Manager Enhancements
– First result, max results, typed results
• Criteria API
• 2nd Level Caching
• Pessimistic Locking
![Page 49: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/49.jpg)
JPA 2 ...
![Page 50: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/50.jpg)
JAX-RS
• Web services through REST instead of SOAP
• REST counterpart of JAX-WS
• Annotations from ground up
• Integration with CDI and EJB@Path("users/{username: [a-zA-Z][a-zA-Z_0-9]}")
public class HelloWorldResource {
@GET
@Produces("text/xml")
public String getMessage(@PathParam("username") String userName) {
return "Hi” + userName + “!! Howz JBoss AS 7 ??";
}
![Page 51: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/51.jpg)
EJB 3.1 ( Lite)
• Removal of the requirement for a separate local business interface.
• Support for direct use of EJBs in the servlet container, including simplified packaging options.
• Singleton beans with different locking options.
• Support for asynchronous session bean invocation.
• Application-level callback notifications, including for container initialization and shutdown.
• EJB Timer Service enhancements to support cron-like scheduling, deployment-time timer creation, and stateful session bean timed objects.
• Lite:
– Local Session Bean, Annotation, Security, Interceptors.
– MDB, Timer, Web Services End Point, RMI-IIOP
![Page 52: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/52.jpg)
EJB 3.1 ( Lite) ...
@javax.ejb.Stateless
public class CarHotelAndAirLineBookingServiceBean {
@javax.ejb.Asynchronous
public Future<BookingConfirmation> bookCarHotelAndAirLine( Car rental, Hotel hotel, AirLine airLine) { ...}
}//end async service
//-------------------------In your JSF bean, you can then do------------------------------
public String makeRequest() {
confirmation = bookingService.bookCarHotelAndAirLine(...);
return "showConfirmationPending";
}
public Future<BookingConfirmation> getConfirmation(){ /* ... */ }
![Page 53: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/53.jpg)
EJB 3.1 ( Lite)
• Removal of the requirement for a separate local business interface.
• Support for direct use of EJBs in the servlet container, including simplified packaging options.
• Singleton beans with different locking options.
• Support for asynchronous session bean invocation.
• Application-level callback notifications, including for container initialization and shutdown.
• EJB Timer Service enhancements to support cron-like scheduling, deployment-time timer creation, and stateful session bean timed objects.
• Lite:
– Local Session Bean, Annotation, Security, Interceptors.
– MDB, Timer, Web Services End Point, RMI-IIOP
![Page 54: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/54.jpg)
Bean Validation
• Specify constraints only once across application layers @NotNull
@Size(min = 1, max = 25)
@Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
private String name;
@NotNull
@Size(min = 10, max = 12)
@Digits(fraction = 0, integer = 12)
private String phoneNumber;
![Page 55: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/55.jpg)
CDI
• Makes Java EE development more productive. !!
• Provides a declarative way to manage the scope, state and life-cycle of components bound to contexts.
• Provides a standardised, annotation-driven, type-safe dependency injection framework for the platform .
• Provides a Service Provider Interface (SPI) for developing portable extensions for the Java EE platform
• What is CDI aka JSR-299's relationship with respect to JSR-330, Dependency Injection?
![Page 56: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/56.jpg)
![Page 57: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/57.jpg)
Community or Enterprise?
![Page 58: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/58.jpg)
Community or Enterprise?
![Page 59: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/59.jpg)
Demo
• Administration Console
• Domain Model
• Quickstart with maven archetype• Deployments
• OpenShift mvn archetype:generate \-DarchetypeArtifactId=jboss-javaee6-webapp \-DarchetypeGroupId=org.jboss.spec.archetypes \-DarchetypeVersion=7.0.0.CR1 \-DarchetypeRepository=repository.jboss.org/ nexus/content/groups/public
mvn archetype:generate \-DarchetypeArtifactId=jboss-javaee6-webapp \-DarchetypeGroupId=org.jboss.spec.archetypes \-DarchetypeVersion=7.0.0.CR1 \-DarchetypeRepository=repository.jboss.org/ nexus/content/groups/public
![Page 60: The Next Generation - Austin Java Users GroupCDI • Makes Java EE development more productive. !! • Provides a declarative way to manage the scope, state and life-cycle of components](https://reader033.fdocuments.in/reader033/viewer/2022041910/5e672300e8eea532865682d6/html5/thumbnails/60.jpg)
OpenShift – EE6 In the Cloud!