Skip to content

Instantly share code, notes, and snippets.

@corrspt
Created November 9, 2013 12:10
Show Gist options
  • Select an option

  • Save corrspt/7384811 to your computer and use it in GitHub Desktop.

Select an option

Save corrspt/7384811 to your computer and use it in GitHub Desktop.
EboContext description
<%@page import="netgest.bo.runtime.EboContext"%>
<%@page import="netgest.bo.runtime.boObjectList"%>
<%@page import="netgest.bo.runtime.boObject"%>
<%@page import="netgest.bo.system.boApplication"%>
<%@page import="netgest.bo.system.boSession"%>
<%@page import="netgest.bo.system.boLoginBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
boSession xeoSession = null;
EboContext ctx = null;
try {
//Login with a default usrr
xeoSession = boApplication.getDefaultApplication().boLogin("ROBOT",boLoginBean.getSystemKey());
//Create a context for the request
ctx = xeoSession.createRequestContext( request, response, null );
//Add the request to the current request, so that everyone can use boApplication.currentContext().getEboContext()
boApplication.currentContext().addEboContext( ctx );
//Process the Request
} finally {
//Close the resources, or you'll end up without database connections
if (ctx != null){
ctx.close();
}
if (xeoSession != null){
xeoSession.closeSession();
}
}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment