Java EE and Vaadin
There are 5 Java EE 7 and total 24 Java EE 6 compliant implementations and as a pure-Java technology, Vaadin is compatible with all of them.
Typically Vaadin applications and views are managed using the Vaadin CDI extension. Furthermore, while Vaadin APIs are 100% compatible with Java EE 7, there are APIs that you really want to use, and some that don't make too much sense with Vaadin. On this page you can find a detailed checklist, links and documentation for 39 JSRs included in the Java EE 7 to check compatibility details of Vaadin with different Java EE technologies.
All features in Vaadin are also tested in a Java EE 6 compatible environment, so everything mentioned here means that it is also backward compatible.
|Technology||Remarks and links|
Web Application Technologies:
|Java API for WebSocket (JSR356)||Websockets is used through the Atmosphere framework included within Vaadin. Websockets are activated with the @Push annotation in your UI class. If the server does not support this, long polling is used as a fallback method. Read more about it in the tutorial in the wiki.|
|Java API for JSON Processing (JSR353)||Useble directly from within a Vaadin application.
Please note, that in a Vaadin application JSON is typically used via higher level APIs, such as JAX-RS, that automatically map between Java POJOs and JSON objects. See for example this JAX-RS client sample.
|Java Servlet (JSR340)||Vaadin applications are deployed and run as servlets. You can also use a custom servlet with Vaadin and use VaadinSession.getAllSessions(HttpSession) for sharing sessions.|
|JavaServer Faces (JSF) (JSR344)||You can integrate JSF and use VaadinSession.getAllSessions(HttpSession) for sharing sessions.|
|Expression Language (EL) (JSR341)|
|JavaServer Pages (JSP) (JSR52)||You can integrate JSP and use VaadinSession.getAllSessions(HttpSession) for sharing sessions.|
|JavaServer Pages Standard Tag Library (JSTL) (JSR340)||Vaadin applications are deployed and run as servlets. You can also use custom servlets with Vaadin and use VaadinSession.getAllSessions(HttpSession) for sharing sessions.|
Enterprise Application Technologies:
|Batch Applications for the Java Platform (JSR352)||Use the Vaadin CDI add-on to inject a JobContext. Typically used through an application specific Java implementation.|
|Concurrency Utilities for Java EE (JSR236)||Use the Vaadin CDI add-on to inject ManagedExecutorService. To handle Vaadin UI synchronization use the UI.access method.|
|Contexts and Dependency Injection for Java (JSR346)||Fully supported by Vaadin. The Vaadin CDI add-on makes your UI objects CDI managed beans and utilities like custom contexts and navigation are supported.
Read more in the tutorial on how to build Vaadin applications with CDI.
|Dependency Injection for Java (JSR330)||Fully supported and used by the Vaadin CDI add-on.|
|Bean Validation (JSR349)||Vaadin has built-in support for validations. Check out the Example on how to validate input.|
|Enterprise JavaBeans (EJB) (JSR345)||Use the Vaadin CDI add-on to inject your EJBs. Typically used through an application specific Java implementation.|
|Interceptors (JSR318)||Fully supported by the Vaadin CDI add-on.|
|Java EE Connector Architecture (JSR322)||Typically used through an application specific Java implementation.|
|Java Persistence API (JPA) (JSR338)||Use EntityManager in EJB service (not in Vaadin UI) to make trasaction handling automatic. Then you can inject EJBs in the Vaadin UI with Vaadin CDI to access the entity objects or DTOs. Use BeanFieldGroup and BeanItemContainer. For large amounts of data, consider using LazyQueryContainer or the JPAContainer.
Check out the full-featured application example: Vaadin JPA application -sample.
|Common Annotations for the Java Platform (JSR250)|
|Java Message Service API (JMS) (JSR343)||Typically JMS is used to implement backend services, but can also be used in the UI layer. Use the Vaadin CDI add-on to inject JMSContext to your UI class. See a sample app using JMS in Vaadin.|
|Java Transaction API (JTA) (JSR907)||JTA is typically used automatically in service classes like EJBs, but UserTransaction can also be directly injected to your UI objects if needed by your application logic.|
|JavaMail API (JSR919)||JavaMail can be used in Vaadin applications to send email. However, mail sending is typically made in separate services outside the web layer. For a simple example take a look at the error reporting sample.|
Web Services Technologies:
|Java API for RESTful Web Services (JAX-RS) (JSR339)||Web services are typically implemented separately from Vaadin applications and typical Vaadin application don't expose REST services. However, if you need you can expose some data using REST services for third party applications or consume other REST services in your Vaadin application. See a sample app for consuming REST APIs in Vaadin.|
|Implementing Enterprise Web Services (JSR109)||Web services are typically implemented separately from Vaadin application and typical Vaadin application don't expose Web services. However, if you need you can expose some data using Web service for third party applications or consume other Web services in your Vaadin application. See SOAP client and server example.|
|Java API for XML-Based Web Services (JAX-WS) (JSR224)||See above for details.|
|Web Services Metadata for the Java Platform (JSR181)||See above for details.|
|Java API for XML-based RPC (JAX-RPC) (Optional) (JSR101)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs.|
|Java APIs for XML Messaging (JSR67)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs.|
|Java API for XML Registries (JAXR) (JSR93)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs.|
Management and Security Technologies:
|Java Authentication Service Provider Interface for Containers (JSR196)||Java EE Servers provide JAAS (Java Authentication and Authorization Service), Single Sign-On (SSO), LoginModules to authenticate and authorize users.
Vaadin CDI has built in support for Role-based authorization to simplify UI and view configuration in your applications. See this wiki-article for details.
|Java Authorization Service Provider Contract for Containers (JSR115)||See above for details.|
|Java EE Application Deployment (Optional) (JSR88)||This feature is not anymore supported in some of the newest application servers.|
|J2EE Management (JSR77)|
|Debugging Support for Other Languages (JSR45)|
Java EE-related Specs in Java SE:
|Java Architecture for XML Binding (JAXB) (JSR222)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs and/or wrapped in application specific implementations.|
|Java API for XML Processing (JAXP) (JSR206)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs and/or wrapped in application specific implementations.|
|Java Database Connectivity (JSR221)||Use JDBC in your EJBs (not in your Vaadin UI directly) and only expose DTOs to Vaadin applications. If you need direct SQL data binding see SQLContainer.|
|Java Management Extensions (JMX) (JSR3)||Typically not used directly in Vaadin, but via other Java EE JSRs and Java APIs and/or wrapped in application specific implementations.|
|JavaBeans Activation Framework (JAF) (JSR925)|
|Streaming API for XML (StAX) (JSR173)|