Hello Amir,
There is no simple answer to your question as it depends on the configuration of your application - is it standalone or runs in an app.server; are you using Activiti as a library or as a separate application; …
In our project we run Activiti as a library placed in our .EAR (which runs in an app.server, of course). Additionally Activiti is configured to be managed by an external transaction manager (the app. server's one). This allows Activiti to have access to all classes deployed with the EAR and to participate in the business transactions.
I hope this helps at some extent.