Ocelotds : Ocelot data services

Welcome to Ocelotds! Ocelotds is java and javascript framework remoting and web messaging technology that enables developers to easily connect to back-end data and push data in real-time to javascript applications, for more responsive rich Internet application (RIA) experiences.

The best and easiest communication way between java EE and javascript

Do that in java

@DataService(resolver = Constants.Resolver.CDI)
public class MyService {
   public MyResult getSomething(Param1 p1, Param2) {
      // Your business code

Do that in javascript

myService.getSomething(param1, param2).then(function (myresult) {

From Ocelotds 2.11.0, works even better with Angularjs framework.
Add dependecy 'ocelot.ds' in your application.
In your controller, inject your service (same name of java service), call method on it
Ocelot is asynchron, so add $scope.$apply() in handler.

In your index.html include angularjs generated ocelotds js

<script src="ocelot/services.ng.js" type="text/javascript"></script>
<script src="ocelot/core.ng.min.js" type="text/javascript"></script>

Add ocelot.ds as application dependency

angular.module('my.app', ['ocelot.ds']);

Inject your service in your controller, naturally

MyController.$inject = ['$scope', 'myService'];
function MyController($scope, myService) {
	var inst = this;
	inst.list = [];
	inst.getListOfSomething = function() {
		myService.getEntityList().then(function (list) {
			inst.list = list;

Ocelotds overview

Ocelotds is the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end data and push data in real-time to Javascript applications for more responsive rich Internet application (RIA) experiences.
The evolution to more engaging RIAs has created the need for better data connectivity options. Remoting simplifies the reuse of existing server logic automatically marshalling calls between the Javascript client and the Java methods on the server. In addition, the use of a json data transfer format increases performance.
Available for any javascript framework like Angularjs, Knockout... Ocelotds gives the rapidly growing Javascript developer community access to the powerful remoting and messaging technologies.

Reasons to Adopt Ocelotds

The following are the top reasons to adopt Ocelotds:

For a complete description of the Ocelotds features, please refer to the Ocelotds Feature List

What is the way to communication between java web layer and javascript framework ?

Forget REST, forget AJAX, forget http, forget protocol. Ocelotds uses two endpoints and do everything for you.

Ocelotds use a bidirectional connection WebSocket and a REST endpoint, it is designed to be use in a single page application (SPA).

Open source

 Ocelot is open source MPLv2.
 Fork it or contribute to the project.

Great features

Ocelotds framework allows javascript calls to different services directly to your java methods call ! As if your were in you back-end.

Don't write WEB Services, focus on business code. Ocelotds will manage the communication between the business layer and the front-end.

The best way, is to use managed beans, as EJB, CDI Bean or Spring bean. But you can call a simple pojo.
If you use managed classes, you will benefits from all features

Java EE compliant

Ocelotds uses Java EE technologies, nothing else, so you can use all natives and standards features of Java EE.

Example : @Inject, @RoleAllowed, @Interceptor, @Decorator ...

Comprehensive and very easy

No configuration needed, just add ocelotds to your maven dependencies and javascript core in your main html page

Very fast

Ocelotds can share thousands of messages in seconds between the java layer and the javascript layer.

Native push messages

Ocelotds uses a bi-directional connection. So to write a chat-like, channel or topic paradigm is really easy. Check the Demos, and see by yourself !

Cache features

Configure your cache directly from the back-end : annotate a method with @JsCacheResult and its the result will be cached on the front-end.
To reset the front-end cache, annotate another method with @JsCacheRemove and it will remove the cache for all clients.

Dashboard page

Ocelotds exposes a page with the totality of services, you can test and monitor them easily.
For exemple this site uses ocelotds so you can see this page to dashboard. Test it


Ocelotds can work with the most famous back-end technologies : EJB, CDI, Spring. But also with the most famous front-end frameworks : Angularjs, knockoutjs,...


Ocelotds is extensible. You can write your own resolver to access to your favorite technologies.

Ocelotds is tested with Glassfish 4.1, Wildfly 9, and Tomcat 7/8.

Ocelotds is developped with Java EE server glassfish 4.
But Ocelotds can work in all servlets containers, like tomcat, without EJB features of course. Just add the cdi and json processing implementation :

See the documentation about the tomcat server for more details.

Modern & Robust


Ocelotds framework on Nexus repository
Ocelotds framework on Central repository

Codecov Status Coverity Status Build Status Dependency Status