cancel
Showing results for 
Search instead for 
Did you mean: 

Using Database in the Java Service Task

frank41
Champ in-the-making
Champ in-the-making
Hi all !
I'm evaluating Activiti for a BPM based Web solution. I have the requirement to re-use some Java classes as nodes in my Workflow. Since these Java classes perform operation on the DB, I'd be interested to know if a Java Service Task could be able to use an application server's Connection Pool-or an EntityManager reference (and thus use JPA). In our case we are planning to deploy our application on JBoss AS 7
Thanks a lot
Frank!
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi Frank,

Yes you can do that. You can use JNDI to get hold of these references or use for example the Activiti Spring module to inject those in the service task delegate class.

Best regards,

frank41
Champ in-the-making
Champ in-the-making
Thanks Tijs, I've managed to do it using your suggestion!
regards
Frank