Embedding Nuxeo? Embedding Nuxeo?

Here is an excellent question from mainzelM. He asks how to embed Nuxeo in his application.

He references the documentation in his answer, which does explain one way your application can interact with Nuxeo. But this is just one of the possible options Nuxeo puts at your fingertips. Let's talk about the others :)

Full Integration with Nuxeo


So as you can see from the picture, you have multiple choices.

Integration Examples Integration Examples


Embed your application inside Nuxeo Server

Imagine you have a simple webapp with one servlet. All you have to do is put your jar in the lib directory, and declare the servlet in the web.xml. Since Nuxeo has a modular development model, you need to create a new module using the IDE, then add some xml code in the deployment-fragment.
Deployment-fragments are used to generate the usual config files: web.xml, faces-config.xml, and the like.

Here is an example for JavaMelody:

<?xml version="1.0"?>
<fragment version="1">

<extension target="web#FILTER">

<extension target="web#LISTENER">


Now put the jar containing this fragment in the plugins folder of your server, and then the JavaMelody jar in the lib folder. And that's it. You're done :)

Use Nuxeo's service from your Java application

You can also embed Nuxeo Client in your java application, which is readily available from our maven repository. The code is quite simple:

public static void main(String[] args) throws Exception {
HttpAutomationClient client = new HttpAutomationClient(

Session session = client.getSession(&quot;Administrator&quot;, &quot;Administrator&quot;);
Documents docs = (Documents) session.newRequest(&quot;Document.Query&quot;).set(
       &quot;query&quot;, &quot;SELECT * FROM Document&quot;).execute();



And if you need other operations than the default one, it's simple to create your own with Nuxeo IDE.

There is also a nice PHP client on github.

Use Nuxeo's service via WebService

Most Nuxeo services are exposed as Web services. You can choose from a variety:
-WebServices (JAX-RS, JAX-WS...)

Of course, this is the easiest way to interact with Nuxeo if your application is not written in Java.

Embed Nuxeo's services inside your application

And now we come back to the original subject of the question. Be sure to take a look at Martin’s question and the associated documentation for more information on this last option.