[seam-dev] Seam/jBPM integration within the SOA platform

Marek Novotny mnovotny at redhat.com
Tue May 12 07:32:10 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Conner napsal(a):
> Dan Allen wrote:
>> Of course, then you must have Seam doing all calls to jBPM or else you
>> will be outside of a transaction. I'm unaware of whether this was
>> considered (not saying it wasn't). That explains, though, why Seam has
>> the workInTransaction callbacks.
> 
> This is the configuration we are using
> 
>     <service name="persistence">
>       <factory>
>         <bean
> class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
>           <field name="isTransactionEnabled"><false/></field>
>           <field name="isCurrentSessionEnabled"><true/></field>
>         </bean>
>      </factory>
>      </service>

this configuration works also in our TODO example (jbpm integration with
seam)

> 
> This is similar to the seam configuration except that the
> JtaDbPersistenceServiceFactory will create a JTA transaction if one does
> not already exist.

cool, this is it what we need.
> 
> The specific issue we are seeing relates more to the hibernate behaviour
> rather than explicit jBPM behaviour.  The configuration in SOA is such
> that we end up using a JTASessionContext within hibernate and this is
> configured to close the session when the transaction terminates.  Any
> subsequent transaction usage on the same session, or even manipulation
> of the objects outside of the transaction, will result in the following.
> 
>>     When running a seam example on the SOA platform we were seeing an
>>     exception being thrown as a result of a hibernate session being used
>>     after it has previously been closed, this was a SessionException with
>>     the text "Session is closed!".
> 
> The seam integration can reuse the same jBPM context in different
> transactions and also pass the hibernate objects outside of the
> transaction.  Both of these scenarios result in unusable context and/or
> hibernate objects within the SOA environment.
> 
> 	Kev
> 
> BTW The two instances of passing objects outside of the transaction
> boundary were found in ProcessInstance and TaskInstance.  Wrapping the
> invocation from Contexts created a transaction that also encompassed the
> method invocations on those objects.
> 


- --
Marek Novotny
- --
JBoss Seam Product Lead

Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno

Email: mnovotny at redhat.com
Office phone: +420 532 294 287, ext. 82-62 087
mobile: +420 608 509 230

- ------------------------------------------------------
Looking to carve out IT costs?
www.europe.redhat.com/promo/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJXjYACgkQU4HO8G8hNxVR5wCgkPdaHTUgAnH7p648cNbw2CkQ
NaMAnRC/M2U2xV2RG2ZzMD7gSnABTtFL
=lpZb
-----END PGP SIGNATURE-----



More information about the seam-dev mailing list