It is not specific to Axis2 but:
this servlet gets loaded before anything else via load on startup
Code:
<servlet>
<servlet-name>appInit</servlet-name>
<servlet-class>com.sourcelabs.sash.demo.abuilder.opc.web.WebAppContextInitializer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Code:
public class WebAppContextInitializer extends HttpServlet {
public void init() throws ServletException {
super.init();
OPCApplicationCxt._setupContext( "opc" );
getServletContext().setAttribute( "appContext",OPCApplicationCxt.getCxt() );
}
}
the context is Spring context and all the service POJOs are wrapped in transaction interceptors to implement hibernateSession-per-businessTransaction strategy
Axis binding class simply delegates calls to the wrapped POJOs
[code]
public class PurchaseOrderService implements PurchaseOrderIntf {
public String submitPurchaseOrder( PurchaseOrder poObject ) throws POException, RemoteException{
public POStatus getPurchaseOrderStatus( String id ) throws RemoteException{
return OPCApplicationCxt.getPurchaseOrderServiceLogic().getPurchaseOrderStatus( id );
}
public PurchaseOrder getPurchaseOrder( String id ) throws POException, RemoteException{
return OPCApplicationCxt.getPurchaseOrderServiceLogic().getPurchaseOrder( id );
}
}
[/code
]