Ok, I have the engine working, having created an instance in a @PostConstruct method. I could make some tests with that, and the first thing that I have to say is that I like Activiti very much: it is easy to configure and make it work. As for that, I have some more questions/ideas.
1- The same old question: which would be the best way to use Activiti in our environment?. jbarrez give an interesting idea of storing the engine in jndi and have them autoinjected. How could that be done?.
2- Transactions: the user guide says "Currently only supports configuration by passing the jdbc properties (datasource through JNDI will be supported soon).". So I guess that Activiti manages its owns transactions. In my case, we are using JTA; CMT more precisely. That means that I can inject a datasource (having a JNDI name), and it act as any other transactional resource (for example, an Entity Manager using JPA), letting the container to manage the transactions. It would be good that I could pass this datasource to the engine to use it. Note that I think (maybe am I wrong?) that if the engine obtain a datasource through JNDI, it should manage the transactions too, so is not the same case.
3- DB schema: is there a way to choose on which DB schema Activiti tables should be created?.
Thanks very much,
tizo