Created
November 9, 2013 12:10
-
-
Save corrspt/7384811 to your computer and use it in GitHub Desktop.
EboContext description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@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