This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes JBoss connection time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss connection time out" Watch "JBoss connection time out" New topic

JBoss connection time out

Tom Ys

Joined: Sep 22, 2011
Posts: 3

My environment is: Windows XP, Eclipse 3.4.1 and JBOSS 5.0.1

I am connecting to another web service using a Java Bean through JBoss which will take some time to complete, possibly 8 hours. The Java Bean calls the other service which is in IIS, then may have to wait up to 8 hours. This is a problem for the Java Bean since it times out after 5minutes.

Is there an option I can use within the Java Bean or in a JBOSS config which will extend the timeout?

Tom Ys

Joined: Sep 22, 2011
Posts: 3

I did find option in file: deploy/transaction-jboss-beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">

<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>

<property name="transactionTimeout">300</property>

The property above, transactionTimeout, is 300. If I jack this up to 8 hours: 28800sec Will this do it? Or, will I have to adjust another timeout?
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I think you need to come up with an alternate design. You really should not have a call waiting for 8 hours for something to finish. You should rig up an eventing or callback mechanism instead. Even a poling mechanism would be better than waiting for 8 hours.

JBoss In Action
Tom Ys

Joined: Sep 22, 2011
Posts: 3

Thanks for the suggestion. If you can, please send links to examples of your suggestions? I would be glad to explore these options. Right now, this small shop wants this design out the door Tuesday and the computers involved are dedicated. My questions is still out there...
I agree. Here's the link:
subject: JBoss connection time out
jQuery in Action, 3rd edition