How to set EJB timeout period ?

JBoss recipe of the day

Use Container managed transactions.

Open jboss-service.xml ( in the conf directory)

 
   <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
      name="jboss:service=TransactionManager">
      <attribute name="TransactionTimeout">300</attribute>
      <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> 
   </mbean>

Modify the TransactionTimeout attribute as you need.

Note: The timeout attribute is in seconds not in milliseconds !