openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: To TransactionAttributeType.NOT_SUPPORTED or not to TransactionAttributeType.NOT_SUPPORTED
Date Fri, 03 Feb 2012 20:08:39 GMT
Hi Tom,
Sorry that I missed this one...  Maybe you have already figured out the
answer...

First off, JPA does not play into your transaction timeout or suspension
processing.  All of that is part of the WebSphere application server
processing, so I would reference the InfoCenter for more definitive answers
[1].

But, I do know that any active transaction will be suspended when a
NOT_SUPPORTED method is encountered.  So, any time that your innerMethod is
invoked, the current transaction would be suspended.  As far as whether the
timer keeps running, I would guess "yes", but I think you need some JTA
experts to be sure.

HTH,
Kevin

[1]
http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.express.iseries.doc/info/iseriesexp/ae/tjta_settlog.html

On Wed, Jan 25, 2012 at 9:20 PM, Tom Rowe <
charles.paisley.the.baby.crusher@gmail.com> wrote:

> Greetings to my former JPA friends.  I have a few questions about
> TransactionAttributeType.NOT_SUPPORTED.
> My environment is WAS v7, but I think it matters not.
> Here's the setup..
>
> - - - - - - - - - - - - - - - - - - - - - -
>
> @Stateless
> public class OuterService implements IOuterService {
>
>    @PersistenceContext( unitName = "OuterService" )
>    EntityManager em;
>
>    @EJB( name = "ejblocal:com.mycompany.mypackage.IInnerService" )
>    IInnerService innerService;
>
>    ....
>
>    public Object outerMethod() throws Exception {
>       ...
>       innerService.innerMethod();
>       ...
>    }
> }
>
> - - - - - - - - - - - - - - - - - - - - - -
>
> package com.mycompany.mypackage;
> @Stateless
> public class InnerService implements IInnerService {
>
>    @PersistenceContext( unitName = "OuterService" )
>    EntityManager em; // PC matches!
>
>    ....
>
>    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
>    public Object innerMethod() throws Exception {
>       ...
>    }
> }
>
> - - - - - - - - - - - - - - - - - - - - - -
>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
>        version="2.0">
>        <persistence-unit name="OuterService">
>                <jta-data-source>MY-JTA-DATA-SOURCE</jta-data-source>
>                <class>...</class>
>                ...
>                <properties>
>                        <property name="javax.persistence.jdbc.user"
> value="me" />
>                        <property name="javax.persistence.jdbc.password"
> value="password" />
>                        <property name="openjpa.jdbc.SynchronizeMappings"
> value="validate" />
>                </properties>
>        </persistence-unit>
> </persistence>
>
> - - - - - - - - - - - - - - - - - - - - - -
>
> Questions:
> 1. Do WebSphere transaction timeouts (default=120 secs) get suspended
> across
> calls to innerMethod() because of TransactionAttributeType.NOT_SUPPORTED?
> 2. Do WebSphere transaction timeouts get suspended across calls to
> outerMethod() when/if innerService.innerMethod() is invoked?
>
> Thanks, in advance for your time and consideration..
>
> Tom Rowe
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/To-TransactionAttributeType-NOT-SUPPORTED-or-not-to-TransactionAttributeType-NOT-SUPPORTED-tp7225877p7225877.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message