openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Rowe <charles.paisley.the.baby.crus...@gmail.com>
Subject Re: To TransactionAttributeType.NOT_SUPPORTED or not to TransactionAttributeType.NOT_SUPPORTED
Date Fri, 03 Feb 2012 21:19:26 GMT
Kevin:

Thank you for your insights.  This helps a lot.

Cheers,

Tom

On Fri, Feb 3, 2012 at 3:09 PM, Kevin Sutter [via OpenJPA] <
ml-node+s208410n7251989h22@n2.nabble.com> wrote:

> 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 <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=7251989&i=0>>
> 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.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openjpa.208410.n2.nabble.com/To-TransactionAttributeType-NOT-SUPPORTED-or-not-to-TransactionAttributeType-NOT-SUPPORTED-tp7225877p7251989.html
>  To unsubscribe from To TransactionAttributeType.NOT_SUPPORTED or not to
> TransactionAttributeType.NOT_SUPPORTED, click here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7225877&code=Y2hhcmxlcy5wYWlzbGV5LnRoZS5iYWJ5LmNydXNoZXJAZ21haWwuY29tfDcyMjU4Nzd8LTE1MjI1NjcxODk=>
> .
> NAML<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: http://openjpa.208410.n2.nabble.com/To-TransactionAttributeType-NOT-SUPPORTED-or-not-to-TransactionAttributeType-NOT-SUPPORTED-tp7225877p7252234.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message