10. Why Web profile?
• Java EE Servers is too large, complex
and slow to use quickly
• For Web applications, some of Java
EE feature is unused
• Web container is often powerless for
large Web applications
11. Main features
• Web application (JSF, MVC [*1])
• RESTful Web service (JAX-RS)
• Persistence and Transaction (JPA/JTA)
• Dependency Injection (CDI)
*1 : 3rd party framework or MVC (Java EE 8 Draft)
12. Omit from Web profile
• Inter-systems interfaces
e.g. JAX-WS, JMS, JavaMail, JCA
• Authentication/Authorization
e.g. JACC/JAAS, JASPIC
• Server management (JSR 77)
• J2EE legacy components
13. EJB Notice
• Web profile contains EJB Lite; subset
of EJB (Full specs.)
• Incl. Session Bean (Local/No I/F),
JPA/JTA, Async, Timer (Not persist),
etc.
• Excl. Session Bean (Remote), MDB,
JAX-WS, Timer (Persist) etc.
14. EJB Timer (Not persist)
@Schedule(..., persistent = false)
void polling() {
// processing
}
(By default, the value of 'persistent' is true)
15. History of Web Profile
• Introduction as a part of Java EE 6
(JAX-RS is excluded)
• Add JAX-RS, WebSocket, JSON-P to
Java EE 7 Web Profile
• Add MVC to Java EE 8 Web Profile
(by Early Draft)
16. How to use?
• Download 'Web Profile'
e.g. GlassFish, WAS Liberty
• Run as 'Web Profile'
e.g. WildFly, JBoss EAP
• Not Compatible
e.g. WebLogic (Coming soon?)
20. How fast?
Startup time (*)
1 2 3
WildFly 10
Full Platform
4959 ms 5085 ms 5090 ms
WildFly 10
Web Profile
3907 ms 4164 ms 3952 ms
* Surface Pro 2 (Windows 10 / Core i5 4300U / 4GB RAM)
21. Full vs. Web Profile
Full Platform Web Profile
Target System Web application
Features Complete Restrict
Speed Slow Fast
Footprint Large Small
Security Strict Basic
36. How to use JavaMail?
• JavaMail is not in Web Profile
• But we can use JavaMail as a library
of our applications
• Other feature that is not in Web Profile
can use as library of applications
38. What's Microservice
• The microservice architectural style is an approach
to developing a single application as a suite of small
services, each running in its own process and
communicating with lightweight mechanisms
-- Martin Fowler
• Spring Boot is a famous technology
for implementation of microservices
39. Java EE Microservice
• Some technologies are available;
Payara Micro, WAS Liberty,
WildFly Swarm, kumuluzEE, etc.
• They consists of a subset of Java EE
API (such a Web Profile)
• They also run on Java SE runtime
-- Their footprint is so small
41. Why needs Web Profile?
• Java EE specs. are too large to build
Web applications
• Some of Java EE specs. are so often
unused
• We needed the standard that subset
of Java EE for Web applications
42. • Development of almost web apps.
• In particular case:
• Migration from Tomcat
• Real time web apps. (WebSocket)
• RESTful Web services (JAX-RS)
Use case of Web Profile
43. Attentions
• Web Profile is NOT for systems but
for applications
• Web Profile is lightweight, but some
important feature is omitted
• There is not "Golden Hammer". We'd
use the two specs. for purpose
44. Basic method for
Java EE Web Profile
HASUNUMA Kenji
GlassFish Users Group Japan
k.hasunuma@coppermine.jp
Twitter: @khasunuma