You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jieryn <ji...@gmail.com> on 2013/10/30 13:38:49 UTC

Apache TomEE and @Schedule timeout

Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
@Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
*/ } } have the following error:

WARNING [EjbTimerPool - 901]
org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
execute ejbTimeout on MySchedule successfully within 1 attempts

And then the transaction is rolled back. How can I extend the timeout
such that I have more time for MySchedule#run in order to do its
processing?

Re: Apache TomEE and @Schedule timeout

Posted by Romain Manni-Bucau <rm...@gmail.com>.
weird I tested it before pasting it on trunk
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/10/31 jieryn <ji...@gmail.com>:
> Nope..
>
> <?xml version="1.0" encoding="UTF-8"?>
> <tomee>
> <TransactionManager id="transactionManager"
> type="javax.transaction.TransactionManager">
> defaultTransactionTimeoutSeconds=3600
> </TransactionManager>
> </tomee>
>
> 31-Oct-2013 12:47:16.990 SEVERE [main]
> org.apache.openejb.config.ConfigurationFactory.configureService Failed
> Configuring Service(id=transactionManager)
>  org.apache.openejb.config.NoSuchProviderException: Cannot determine a
> provider for TransactionManager(id=transactionManager,
> type=javax.transaction.TransactionManager, provider=null).
>
> Possible valid configurations might be:
>   <TransactionManager id="transactionManager" type="TransactionManager"/>
>         at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
>         at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
>         at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
>         at java.lang.reflect.Method.invoke(Method.java:613)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
>
> If I change it to just type="TransactionManager" then it works, even
> without an id= .. is this a bug? Can someone please update
> http://tomee.apache.org/containers-and-resources.html with the correct
> information?
>
>
> On Thu, Oct 31, 2013 at 11:11 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> You surely nee d to add an id:
>> <TransactionManager id="transactionManager" type="TransactionManager">
>> defaultTransactionTimeoutSeconds=3600
>> </TransactionManager>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2013/10/31 jieryn <ji...@gmail.com>:
>>> Thank you for that information, I also find
>>> https://tomee.apache.org/containers-and-resources.html
>>>
>>> Now, when I make my conf/tomee.xml be this:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <tomee>
>>> <TransactionManager type="javax.transaction.TransactionManager">
>>> defaultTransactionTimeoutSeconds=3600
>>> </TransactionManager>
>>> </tomee>
>>>
>>> After starting Apache TomEE I have the following error:
>>>
>>> INFO [main] org.apache.openejb.config.ConfigurationFactory.init
>>> openejb configuration file is '/home/tomee/myapp/conf/tomee.xml'
>>> INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService
>>> Configuring Service(id=Tomcat Security Service, type=SecurityService,
>>> provider-id=Tomcat Security Service)
>>> SEVERE [main] org.apache.openejb.config.ConfigurationFactory.configureService
>>> Failed Configuring Service(id=null)
>>>  org.apache.openejb.config.NoSuchProviderException: Cannot determine a
>>> provider for TransactionManager(id=null,
>>> type=javax.transaction.TransactionManager, provider=null).
>>>
>>> Possible valid configurations might be:
>>>   <TransactionManager id="null" type="TransactionManager"/>
>>>         at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
>>>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
>>>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
>>>         at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
>>>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
>>>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
>>>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
>>>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
>>>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
>>>         at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
>>>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>>         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>>>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>>>         at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
>>>         at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
>>>         at java.lang.reflect.Method.invoke(Method.java:613)
>>>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>>>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
>>>
>>>
>>>
>>> On Thu, Oct 31, 2013 at 9:28 AM, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>>> here it is http://openejb.979440.n4.nabble.com/How-to-configure-default-transaction-timeout-in-TomEE-td4657383.html
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>>
>>>>
>>>>
>>>> 2013/10/31 jieryn <ji...@gmail.com>:
>>>>> Hello,
>>>>>
>>>>> I did not customize the timeout of the transaction manager, I'm sorry,
>>>>> how do I do that?
>>>>>
>>>>> The transaction time is generally less than the @Schedule frequency,
>>>>> unless something goes wrong, and then we have more and more items to
>>>>> process the next time. Which makes this a worsening problem of a
>>>>> kind.. the more times we fail the longer the next one is going to
>>>>> take.
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
>>>>> <rm...@gmail.com> wrote:
>>>>>> Hi
>>>>>>
>>>>>> 1h? You customized the timeout of the transaction manager?
>>>>>>
>>>>>> That said you have a biggest issue if you processing is longer than your
>>>>>> scheduling. In particular in write mode. We have a retry config but maybe
>>>>>> check you do what you want cause all technical solutions about this timeout
>>>>>> will be workarounds and not real solutions
>>>>>> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>>>>>>
>>>>>>> Thanks for that information, Howard.
>>>>>>>
>>>>>>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>>>>>>> still take the aforementioned Exception. It seems that some of my
>>>>>>> transactions can take upwards of an hour to complete and that Apache
>>>>>>> TomEE deems this unacceptable.
>>>>>>>
>>>>>>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>>>>>>> <sm...@gmail.com> wrote:
>>>>>>> > i am doing the same (see the URLs below).
>>>>>>> >
>>>>>>> > /**
>>>>>>> >  *
>>>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>>>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>>>>>>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>>>>>>> >  */
>>>>>>> > @Singleton
>>>>>>> > @Lock(LockType.WRITE)
>>>>>>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>>>>>>> > public class EmailRequestBean {
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>>>>>>> >
>>>>>>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>>>>>>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>>>>>>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>>>>>>> >> */ } } have the following error:
>>>>>>> >>
>>>>>>> >> WARNING [EjbTimerPool - 901]
>>>>>>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>>>>>>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>>>>>>> >>
>>>>>>> >> And then the transaction is rolled back. How can I extend the timeout
>>>>>>> >> such that I have more time for MySchedule#run in order to do its
>>>>>>> >> processing?
>>>>>>> >>
>>>>>>>

Re: Apache TomEE and @Schedule timeout

Posted by jieryn <ji...@gmail.com>.
Nope..

<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<TransactionManager id="transactionManager"
type="javax.transaction.TransactionManager">
defaultTransactionTimeoutSeconds=3600
</TransactionManager>
</tomee>

31-Oct-2013 12:47:16.990 SEVERE [main]
org.apache.openejb.config.ConfigurationFactory.configureService Failed
Configuring Service(id=transactionManager)
 org.apache.openejb.config.NoSuchProviderException: Cannot determine a
provider for TransactionManager(id=transactionManager,
type=javax.transaction.TransactionManager, provider=null).

Possible valid configurations might be:
  <TransactionManager id="transactionManager" type="TransactionManager"/>
        at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
        at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
        at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
        at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
        at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

If I change it to just type="TransactionManager" then it works, even
without an id= .. is this a bug? Can someone please update
http://tomee.apache.org/containers-and-resources.html with the correct
information?


On Thu, Oct 31, 2013 at 11:11 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> You surely nee d to add an id:
> <TransactionManager id="transactionManager" type="TransactionManager">
> defaultTransactionTimeoutSeconds=3600
> </TransactionManager>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/10/31 jieryn <ji...@gmail.com>:
>> Thank you for that information, I also find
>> https://tomee.apache.org/containers-and-resources.html
>>
>> Now, when I make my conf/tomee.xml be this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <tomee>
>> <TransactionManager type="javax.transaction.TransactionManager">
>> defaultTransactionTimeoutSeconds=3600
>> </TransactionManager>
>> </tomee>
>>
>> After starting Apache TomEE I have the following error:
>>
>> INFO [main] org.apache.openejb.config.ConfigurationFactory.init
>> openejb configuration file is '/home/tomee/myapp/conf/tomee.xml'
>> INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService
>> Configuring Service(id=Tomcat Security Service, type=SecurityService,
>> provider-id=Tomcat Security Service)
>> SEVERE [main] org.apache.openejb.config.ConfigurationFactory.configureService
>> Failed Configuring Service(id=null)
>>  org.apache.openejb.config.NoSuchProviderException: Cannot determine a
>> provider for TransactionManager(id=null,
>> type=javax.transaction.TransactionManager, provider=null).
>>
>> Possible valid configurations might be:
>>   <TransactionManager id="null" type="TransactionManager"/>
>>         at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
>>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
>>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
>>         at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
>>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
>>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
>>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
>>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
>>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
>>         at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
>>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>>         at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
>>         at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
>>         at java.lang.reflect.Method.invoke(Method.java:613)
>>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
>>
>>
>>
>> On Thu, Oct 31, 2013 at 9:28 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>>> here it is http://openejb.979440.n4.nabble.com/How-to-configure-default-transaction-timeout-in-TomEE-td4657383.html
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau
>>>
>>>
>>>
>>> 2013/10/31 jieryn <ji...@gmail.com>:
>>>> Hello,
>>>>
>>>> I did not customize the timeout of the transaction manager, I'm sorry,
>>>> how do I do that?
>>>>
>>>> The transaction time is generally less than the @Schedule frequency,
>>>> unless something goes wrong, and then we have more and more items to
>>>> process the next time. Which makes this a worsening problem of a
>>>> kind.. the more times we fail the longer the next one is going to
>>>> take.
>>>>
>>>>
>>>>
>>>> On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
>>>> <rm...@gmail.com> wrote:
>>>>> Hi
>>>>>
>>>>> 1h? You customized the timeout of the transaction manager?
>>>>>
>>>>> That said you have a biggest issue if you processing is longer than your
>>>>> scheduling. In particular in write mode. We have a retry config but maybe
>>>>> check you do what you want cause all technical solutions about this timeout
>>>>> will be workarounds and not real solutions
>>>>> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>>>>>
>>>>>> Thanks for that information, Howard.
>>>>>>
>>>>>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>>>>>> still take the aforementioned Exception. It seems that some of my
>>>>>> transactions can take upwards of an hour to complete and that Apache
>>>>>> TomEE deems this unacceptable.
>>>>>>
>>>>>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>>>>>> <sm...@gmail.com> wrote:
>>>>>> > i am doing the same (see the URLs below).
>>>>>> >
>>>>>> > /**
>>>>>> >  *
>>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>>>>>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>>>>>> >  */
>>>>>> > @Singleton
>>>>>> > @Lock(LockType.WRITE)
>>>>>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>>>>>> > public class EmailRequestBean {
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>>>>>> >
>>>>>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>>>>>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>>>>>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>>>>>> >> */ } } have the following error:
>>>>>> >>
>>>>>> >> WARNING [EjbTimerPool - 901]
>>>>>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>>>>>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>>>>>> >>
>>>>>> >> And then the transaction is rolled back. How can I extend the timeout
>>>>>> >> such that I have more time for MySchedule#run in order to do its
>>>>>> >> processing?
>>>>>> >>
>>>>>>

Re: Apache TomEE and @Schedule timeout

Posted by Romain Manni-Bucau <rm...@gmail.com>.
You surely nee d to add an id:
<TransactionManager id="transactionManager" type="TransactionManager">
defaultTransactionTimeoutSeconds=3600
</TransactionManager>

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/10/31 jieryn <ji...@gmail.com>:
> Thank you for that information, I also find
> https://tomee.apache.org/containers-and-resources.html
>
> Now, when I make my conf/tomee.xml be this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <tomee>
> <TransactionManager type="javax.transaction.TransactionManager">
> defaultTransactionTimeoutSeconds=3600
> </TransactionManager>
> </tomee>
>
> After starting Apache TomEE I have the following error:
>
> INFO [main] org.apache.openejb.config.ConfigurationFactory.init
> openejb configuration file is '/home/tomee/myapp/conf/tomee.xml'
> INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService
> Configuring Service(id=Tomcat Security Service, type=SecurityService,
> provider-id=Tomcat Security Service)
> SEVERE [main] org.apache.openejb.config.ConfigurationFactory.configureService
> Failed Configuring Service(id=null)
>  org.apache.openejb.config.NoSuchProviderException: Cannot determine a
> provider for TransactionManager(id=null,
> type=javax.transaction.TransactionManager, provider=null).
>
> Possible valid configurations might be:
>   <TransactionManager id="null" type="TransactionManager"/>
>         at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
>         at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
>         at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
>         at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
>         at java.lang.reflect.Method.invoke(Method.java:613)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
>
>
>
> On Thu, Oct 31, 2013 at 9:28 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> here it is http://openejb.979440.n4.nabble.com/How-to-configure-default-transaction-timeout-in-TomEE-td4657383.html
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2013/10/31 jieryn <ji...@gmail.com>:
>>> Hello,
>>>
>>> I did not customize the timeout of the transaction manager, I'm sorry,
>>> how do I do that?
>>>
>>> The transaction time is generally less than the @Schedule frequency,
>>> unless something goes wrong, and then we have more and more items to
>>> process the next time. Which makes this a worsening problem of a
>>> kind.. the more times we fail the longer the next one is going to
>>> take.
>>>
>>>
>>>
>>> On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>>> Hi
>>>>
>>>> 1h? You customized the timeout of the transaction manager?
>>>>
>>>> That said you have a biggest issue if you processing is longer than your
>>>> scheduling. In particular in write mode. We have a retry config but maybe
>>>> check you do what you want cause all technical solutions about this timeout
>>>> will be workarounds and not real solutions
>>>> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>>>>
>>>>> Thanks for that information, Howard.
>>>>>
>>>>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>>>>> still take the aforementioned Exception. It seems that some of my
>>>>> transactions can take upwards of an hour to complete and that Apache
>>>>> TomEE deems this unacceptable.
>>>>>
>>>>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>>>>> <sm...@gmail.com> wrote:
>>>>> > i am doing the same (see the URLs below).
>>>>> >
>>>>> > /**
>>>>> >  *
>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>>>>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>>>>> >  */
>>>>> > @Singleton
>>>>> > @Lock(LockType.WRITE)
>>>>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>>>>> > public class EmailRequestBean {
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>>>>> >
>>>>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>>>>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>>>>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>>>>> >> */ } } have the following error:
>>>>> >>
>>>>> >> WARNING [EjbTimerPool - 901]
>>>>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>>>>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>>>>> >>
>>>>> >> And then the transaction is rolled back. How can I extend the timeout
>>>>> >> such that I have more time for MySchedule#run in order to do its
>>>>> >> processing?
>>>>> >>
>>>>>

Re: Apache TomEE and @Schedule timeout

Posted by jieryn <ji...@gmail.com>.
Thank you for that information, I also find
https://tomee.apache.org/containers-and-resources.html

Now, when I make my conf/tomee.xml be this:

<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<TransactionManager type="javax.transaction.TransactionManager">
defaultTransactionTimeoutSeconds=3600
</TransactionManager>
</tomee>

After starting Apache TomEE I have the following error:

INFO [main] org.apache.openejb.config.ConfigurationFactory.init
openejb configuration file is '/home/tomee/myapp/conf/tomee.xml'
INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Tomcat Security Service, type=SecurityService,
provider-id=Tomcat Security Service)
SEVERE [main] org.apache.openejb.config.ConfigurationFactory.configureService
Failed Configuring Service(id=null)
 org.apache.openejb.config.NoSuchProviderException: Cannot determine a
provider for TransactionManager(id=null,
type=javax.transaction.TransactionManager, provider=null).

Possible valid configurations might be:
  <TransactionManager id="null" type="TransactionManager"/>
        at org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1065)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:467)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
        at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
        at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
        at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
        at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)



On Thu, Oct 31, 2013 at 9:28 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> here it is http://openejb.979440.n4.nabble.com/How-to-configure-default-transaction-timeout-in-TomEE-td4657383.html
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/10/31 jieryn <ji...@gmail.com>:
>> Hello,
>>
>> I did not customize the timeout of the transaction manager, I'm sorry,
>> how do I do that?
>>
>> The transaction time is generally less than the @Schedule frequency,
>> unless something goes wrong, and then we have more and more items to
>> process the next time. Which makes this a worsening problem of a
>> kind.. the more times we fail the longer the next one is going to
>> take.
>>
>>
>>
>> On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
>> <rm...@gmail.com> wrote:
>>> Hi
>>>
>>> 1h? You customized the timeout of the transaction manager?
>>>
>>> That said you have a biggest issue if you processing is longer than your
>>> scheduling. In particular in write mode. We have a retry config but maybe
>>> check you do what you want cause all technical solutions about this timeout
>>> will be workarounds and not real solutions
>>> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>>>
>>>> Thanks for that information, Howard.
>>>>
>>>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>>>> still take the aforementioned Exception. It seems that some of my
>>>> transactions can take upwards of an hour to complete and that Apache
>>>> TomEE deems this unacceptable.
>>>>
>>>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>>>> <sm...@gmail.com> wrote:
>>>> > i am doing the same (see the URLs below).
>>>> >
>>>> > /**
>>>> >  *
>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>>>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>>>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>>>> >  */
>>>> > @Singleton
>>>> > @Lock(LockType.WRITE)
>>>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>>>> > public class EmailRequestBean {
>>>> >
>>>> >
>>>> >
>>>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>>>> >
>>>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>>>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>>>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>>>> >> */ } } have the following error:
>>>> >>
>>>> >> WARNING [EjbTimerPool - 901]
>>>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>>>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>>>> >>
>>>> >> And then the transaction is rolled back. How can I extend the timeout
>>>> >> such that I have more time for MySchedule#run in order to do its
>>>> >> processing?
>>>> >>
>>>>

Re: Apache TomEE and @Schedule timeout

Posted by Romain Manni-Bucau <rm...@gmail.com>.
here it is http://openejb.979440.n4.nabble.com/How-to-configure-default-transaction-timeout-in-TomEE-td4657383.html
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/10/31 jieryn <ji...@gmail.com>:
> Hello,
>
> I did not customize the timeout of the transaction manager, I'm sorry,
> how do I do that?
>
> The transaction time is generally less than the @Schedule frequency,
> unless something goes wrong, and then we have more and more items to
> process the next time. Which makes this a worsening problem of a
> kind.. the more times we fail the longer the next one is going to
> take.
>
>
>
> On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> Hi
>>
>> 1h? You customized the timeout of the transaction manager?
>>
>> That said you have a biggest issue if you processing is longer than your
>> scheduling. In particular in write mode. We have a retry config but maybe
>> check you do what you want cause all technical solutions about this timeout
>> will be workarounds and not real solutions
>> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>>
>>> Thanks for that information, Howard.
>>>
>>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>>> still take the aforementioned Exception. It seems that some of my
>>> transactions can take upwards of an hour to complete and that Apache
>>> TomEE deems this unacceptable.
>>>
>>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>>> <sm...@gmail.com> wrote:
>>> > i am doing the same (see the URLs below).
>>> >
>>> > /**
>>> >  *
>>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>>> >  */
>>> > @Singleton
>>> > @Lock(LockType.WRITE)
>>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>>> > public class EmailRequestBean {
>>> >
>>> >
>>> >
>>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>>> >
>>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>>> >> */ } } have the following error:
>>> >>
>>> >> WARNING [EjbTimerPool - 901]
>>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>>> >>
>>> >> And then the transaction is rolled back. How can I extend the timeout
>>> >> such that I have more time for MySchedule#run in order to do its
>>> >> processing?
>>> >>
>>>

Re: Apache TomEE and @Schedule timeout

Posted by jieryn <ji...@gmail.com>.
Hello,

I did not customize the timeout of the transaction manager, I'm sorry,
how do I do that?

The transaction time is generally less than the @Schedule frequency,
unless something goes wrong, and then we have more and more items to
process the next time. Which makes this a worsening problem of a
kind.. the more times we fail the longer the next one is going to
take.



On Thu, Oct 31, 2013 at 1:28 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Hi
>
> 1h? You customized the timeout of the transaction manager?
>
> That said you have a biggest issue if you processing is longer than your
> scheduling. In particular in write mode. We have a retry config but maybe
> check you do what you want cause all technical solutions about this timeout
> will be workarounds and not real solutions
> Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :
>
>> Thanks for that information, Howard.
>>
>> Even with @AccessTimeout(-1) which should cause it to wait forever, I
>> still take the aforementioned Exception. It seems that some of my
>> transactions can take upwards of an hour to complete and that Apache
>> TomEE deems this unacceptable.
>>
>> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
>> <sm...@gmail.com> wrote:
>> > i am doing the same (see the URLs below).
>> >
>> > /**
>> >  *
>> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>> >  */
>> > @Singleton
>> > @Lock(LockType.WRITE)
>> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
>> > public class EmailRequestBean {
>> >
>> >
>> >
>> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>> >
>> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>> >> */ } } have the following error:
>> >>
>> >> WARNING [EjbTimerPool - 901]
>> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>> >> execute ejbTimeout on MySchedule successfully within 1 attempts
>> >>
>> >> And then the transaction is rolled back. How can I extend the timeout
>> >> such that I have more time for MySchedule#run in order to do its
>> >> processing?
>> >>
>>

Re: Apache TomEE and @Schedule timeout

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

1h? You customized the timeout of the transaction manager?

That said you have a biggest issue if you processing is longer than your
scheduling. In particular in write mode. We have a retry config but maybe
check you do what you want cause all technical solutions about this timeout
will be workarounds and not real solutions
Le 31 oct. 2013 05:58, "jieryn" <ji...@gmail.com> a écrit :

> Thanks for that information, Howard.
>
> Even with @AccessTimeout(-1) which should cause it to wait forever, I
> still take the aforementioned Exception. It seems that some of my
> transactions can take upwards of an hour to complete and that Apache
> TomEE deems this unacceptable.
>
> On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
> <sm...@gmail.com> wrote:
> > i am doing the same (see the URLs below).
> >
> > /**
> >  *
> >  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
> >  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
> >  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
> >  */
> > @Singleton
> > @Lock(LockType.WRITE)
> > @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
> > public class EmailRequestBean {
> >
> >
> >
> > On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
> >
> >> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
> >> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
> >> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
> >> */ } } have the following error:
> >>
> >> WARNING [EjbTimerPool - 901]
> >> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
> >> execute ejbTimeout on MySchedule successfully within 1 attempts
> >>
> >> And then the transaction is rolled back. How can I extend the timeout
> >> such that I have more time for MySchedule#run in order to do its
> >> processing?
> >>
>

Re: Apache TomEE and @Schedule timeout

Posted by jieryn <ji...@gmail.com>.
Thanks for that information, Howard.

Even with @AccessTimeout(-1) which should cause it to wait forever, I
still take the aforementioned Exception. It seems that some of my
transactions can take upwards of an hour to complete and that Apache
TomEE deems this unacceptable.

On Wed, Oct 30, 2013 at 8:54 AM, Howard W. Smith, Jr.
<sm...@gmail.com> wrote:
> i am doing the same (see the URLs below).
>
> /**
>  *
>  * http://tomee.apache.org/examples-trunk/access-timeout/README.html
>  * http://tomee.apache.org/examples-trunk/access-timeout-meta/
>  * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
>  */
> @Singleton
> @Lock(LockType.WRITE)
> @AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
> public class EmailRequestBean {
>
>
>
> On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:
>
>> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
>> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
>> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
>> */ } } have the following error:
>>
>> WARNING [EjbTimerPool - 901]
>> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
>> execute ejbTimeout on MySchedule successfully within 1 attempts
>>
>> And then the transaction is rolled back. How can I extend the timeout
>> such that I have more time for MySchedule#run in order to do its
>> processing?
>>

Re: Apache TomEE and @Schedule timeout

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
i am doing the same (see the URLs below).

/**
 *
 * http://tomee.apache.org/examples-trunk/access-timeout/README.html
 * http://tomee.apache.org/examples-trunk/access-timeout-meta/
 * http://docs.oracle.com/cd/E19798-01/821-1841/gipsz/index.html
 */
@Singleton
@Lock(LockType.WRITE)
@AccessTimeout(value = 2, unit = TimeUnit.MINUTES)
public class EmailRequestBean {



On Wed, Oct 30, 2013 at 8:38 AM, jieryn <ji...@gmail.com> wrote:

> Greetings, I'm using Apache TomEE 1.6.0-SNAPSHOT from a couple of
> weeks ago. I am frequently seeing my @Lock(LockType.WRITE) @Singleton
> @Startup MySchedule { @Schedule(/**/) public void run() { /* slowish
> */ } } have the following error:
>
> WARNING [EjbTimerPool - 901]
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout Failed to
> execute ejbTimeout on MySchedule successfully within 1 attempts
>
> And then the transaction is rolled back. How can I extend the timeout
> such that I have more time for MySchedule#run in order to do its
> processing?
>