# Many flowable engine using the same database

**URL:** <https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925>\
**Category:** Flowable Engine\
**Created:** [April 20, 2018, 4:51pm UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925 "2018-04-20T16:51:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![enk1](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@enk1](https://forum.flowable.org/u/enk1)\
**Post date:** [April 20, 2018, 4:51pm UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925/1 "2018-04-20T16:51:48Z")

</div>

Hi, I’m new using flowable and I trying to do the following case:

I’m creating spring boot services using the starter “flowable-spring-boot-starter-process” and each spring boot application has your own bpmn process. The database (oracle) is the same for all services.  
Everthing is fine when we don’t use TimerCatchEvent. But when we use it, the service A try to start the job from service B and service A doesn’t have the service B classes, and this ends up generating an error of “java.lang.ClassNotFoundException”

Looking for

`ERROR 24055 --- [cTaskExecutor-1] ltAsyncRunnableExecutionExceptionHandler : Job 72521 failed`

I found a topic:

> [Open Source](https://www.flowable.org/docs/userguide/index.html#_configuring_async_executors)

I create the class MyConfiguration.java on my project, but the @Process notation is not recognized.

So, there are any solution to flowable engines projects executing different bpmn process instances with different classes acessing the same database consume only their own timer jobs?

---

<div class="post-metadata">

**Author:** ![psevestre](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/psevestre/32/373_2.png) [@psevestre](https://forum.flowable.org/u/psevestre)\
**Post date:** [April 29, 2018, 1:17pm UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925/2 "2018-04-29T13:17:27Z")

</div>

Did you try to create a custom task executor ? I think that in your case tphis is the way to go.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [May 3, 2018, 10:57am UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925/3 "2018-05-03T10:57:46Z")

</div>

> [@enk1](#):
>
> The database (oracle) is the same for all services.

If your database is shared, all job executors will poll that same database. Meaning you need all custom classes on the classpath of both. If you don’t want that, you’d need to have a separate database for each application.

---

<div class="post-metadata">

**Author:** ![enk1](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@enk1](https://forum.flowable.org/u/enk1)\
**Post date:** [May 25, 2018, 5:27am UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925/4 "2018-05-25T05:27:16Z")

</div>

Thanks for the answer joram!

It’s a common case each application have your own databse, our it’s more common share the database and have duplicate custom classes?  
Is there a better approach?  
Sorry about the questions.

---

<div class="post-metadata">

**Author:** ![rmaugusto](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@rmaugusto](https://forum.flowable.org/u/rmaugusto)\
**Post date:** [December 18, 2018, 11:24am UTC](https://forum.flowable.org/t/many-flowable-engine-using-the-same-database/1925/5 "2018-12-18T11:24:33Z")

</div>

Maybe you can try Multitenancy, each application a tenant:

[https://blog.flowable.org/2018/09/11/multitenancy-in-flowable/](https://blog.flowable.org/2018/09/11/multitenancy-in-flowable/)
