Browse Prior Art Database

Additional Recovery For Access Beans

IP.com Disclosure Number: IPCOM000010989D
Original Publication Date: 2003-Feb-06
Included in the Prior Art Database: 2003-Feb-06
Document File: 3 page(s) / 42K

Publishing Venue

IBM

Abstract

Additional recovery for Access Beans. The invention enhances the robustness of code generated Access Bean so that they recover when an application server region stops by canceling, rolling warm starts or just failures. The recovery support to be incorporated into the access bean would ensure that client requests for transactions would not be lost when server regions become temporarily unavailable.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 50% of the total text.

Page 1 of 3

Additional Recovery For Access Beans

   The invention solves the problem by detecting when communication or attempts to marshall requests to the server region have been disrupted. Once this disruption has been detected, the access bean code would then attempt to create a new reference to the session bean, by performing remote method requests on the create method of the home interface. The access bean would retry this create method, until communication was restored to a new server or the retry limit has been exceeded. Which ever event occurs first. If successful, this would establish a fresh reference to a session bean and the transaction requested by the client would then complete, without any requests being lost.

Sample code:

NewOrderOutputInfo oput = null ;

if (nab == null )

nab = new NewOrderSessionAccessBean();

nab.setInit_JNDIName( super .sessionJndiName);

nab.setInit_GlobalNameServiceTypeName( "com.ibm.websphere.naming.WsnInitialContextFactory" ); try

{

oput = nab.newOrderSession(input, output);

}

catch (org.omg.CORBA.COMM_FAILURE cf)

{

try

{

Thread.sleep(20000L);

}

catch (InterruptedException e)

{

System.out.println( "Sleep interrupted! Exception: " + e);

System.out.println( "StackTrace:" );

e.printStackTrace();

}

super .retries++;

System.out.println( "<<<Retry number: " + super .retries);

if ( super .retries > 30)

throw new irwwbase.UserException( "Attempted to reconnect to new server and have failed after 10 tries" ); nab.resetHomeCache();

nab = null ;

cf.printStackTrace();

tryNretry(input, output);

}

catch (MarshalException me)

{

debugOut(...