AnsweredAssumed Answered

ServiceTask creating lots of new beans

Question asked by halfsoft on Nov 18, 2015
Latest reply on Nov 18, 2015 by halfsoft
I am calling a lot of expressions in ServiceTasks and also checking for conditions in the flow, the bean is declared in the following way:

<bean id="core" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:global/platform-core/platform-core-ejb/Core"/>
        <property name="cache" value="true"/>

However in the stateless bean I have a printLn(String) in the @PostConstruct annotated method and it gets called after every expression evaluation, which makes me believe it creates a new stateless bean instance for each call. How can I make activiti cache the bean and reuse it? Or at least make sure that it uses an object pool?