# ActivityStub can be shared between different workflows or?

**URL:** <https://community.temporal.io/t/activitystub-can-be-shared-between-different-workflows-or/2013>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [April 27, 2021, 6:20pm UTC](https://community.temporal.io/t/activitystub-can-be-shared-between-different-workflows-or/2013 "2021-04-27T18:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sherry\_Ummen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sherry_ummen/32/899_2.png) [@Sherry\_Ummen](https://community.temporal.io/u/Sherry_Ummen)\
**Post date:** [April 27, 2021, 6:20pm UTC](https://community.temporal.io/t/activitystub-can-be-shared-between-different-workflows-or/2013/1 "2021-04-27T18:20:48Z")

</div>

Hi,

Do the activity stub needs to be instantiated every time for each workflow or different workflow can share the same object ?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [April 27, 2021, 6:51pm UTC](https://community.temporal.io/t/activitystub-can-be-shared-between-different-workflows-or/2013/2 "2021-04-27T18:51:25Z")

</div>

ActivityStub is per workflow instance, so they cannot be shared.

The recently added (not yet released as of 4/27) [support](https://github.com/temporalio/sdk-java/pull/448) for setting activity options through [WorkflowImplementationOptions](https://github.com/temporalio/sdk-java/blob/99c34c82b64f353a22a80ebbb751574d8a7e0013/temporal-sdk/src/main/java/io/temporal/worker/WorkflowImplementationOptions.java#L80) reduces the need for sharing.
