Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting component transaction timeout for session EJB

133 views
Skip to first unread message

anand...@gmail.com

unread,
Mar 4, 2008, 11:30:26 PM3/4/08
to
Hello,<br />
<br />
I tried setting the component transaction timeout for a session EJB in the <b>ibm-ejb-jar-ext.xmi</b> as follows:<br />
<br />
&lt;ejbExtensions xmi:type="ejbext:SessionExtension" xmi:id="Session_ext_1"&gt;<br />
&lt;enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#Session_AsyncDespatchServices"/&gt;<br />
<b>&lt;timeout&gt;600&lt;/timeout&gt;</b><br />
&lt;/ejbExtensions&gt;<br />
<br />
Following are the timeout attributes and their values that I have set for the transaction service:<br />
<p />
Total transaction lifetime timeout: 300 seconds<br />
Maximum transaction timeout : 0 seconds<br />
<br />
I expect Webpshere to use the component timeout(600 seconds) that I have specified for my EJB. But my transaction always times-out in 300 seconds. I could not figure out where I went wrong. I have attached the deployment descriptors.

Randy Schnier

unread,
Mar 5, 2008, 11:36:35 AM3/5/08
to
Hi,
The xmi files are designed to be only machine readable and writeable; they are not designed to be edited by customers. The supported way to set parameters such as this is to use either RAD, or the AST tooling, and use the extensions definition panel in the applicable tooling.

anand...@gmail.com

unread,
Mar 6, 2008, 12:24:42 AM3/6/08
to
Hi,<br />
<br />
The xmi file wasn't hand-coded. It was generated as part of the build. I had specified the timeout parameter on my EJB using the XDoclet. Following is the code:<br />
<br />
/**<br />
* Bean implementation class for Enterprise Bean: AsyncDespatchServicesEJB<br />
* <br />
* @ejb.bean description="AsyncDespatchServices"<br />
* display-name="AsyncDespatchServices"<br />
* jndi-name="framework.async.services.AsyncDespatchServicesHome"<br />
* name="AsyncDespatchServices" type="Stateless" view-type="remote"<br />
* remote-business-interface="framework.async.interfaces.AsyncDespatchBI"<br />
* <br />
* @ejb.transaction type="RequiresNew"<br />
* <br />
* <b>@websphere.bean timeout="600"</b><br />
*/<br />
public class AsyncDespatchServicesEJB extends AbstractFacadeEJB {<br />
<br />
//EJB Methods<br />
<br />
}

Randy Schnier

unread,
Mar 6, 2008, 4:50:18 PM3/6/08
to
Hi, thanks for the further explanation.
This is setting the stateful session bean timeout, not the transaction timeout.

I don't believe the xDoclet technique can be used to set bean-specific transaction timeout. To set this extension value, you need to use RAD or the AST tooling as described in the InfoCenter at http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.etools.j2ee.ui.ws.ext.doc/topics/tedglobtx.html .

HTH.

anand...@gmail.com

unread,
Mar 8, 2008, 4:25:10 AM3/8/08
to
Hi,<br />
<br />
I realise that the XDoclet attriute that I have used is for setting the session bean timeout(http://xdoclet.sourceforge.net/xdoclet/tags/ibm-tags.html). Will try out the AST tooling. Thanks a lot for your response.
0 new messages