Hello guys,
I'm trying to develop a java class that connects a web system (made in struts) with a SAP backend.
i want that class to offer a Jco Destination always opened and with it's context opened (JCoContext.begin(conn)). if I achieve this then i can preload my SAP rfc's with data so that they run way faster (rather than fetching the data all over again with each rfc request).
The problem is that i read that the context i desire to keep always opened (so it can give me the statefulness i need) will close if the thread of execution ends (even if i dont issue the JCoContext.end(conn) command.
i'm thinking that maybe a servlet will do. Offering my class as a servlet, but i have my doubts since i think that every request to the servlet will be a separate thread, hence, closing my desired context.
What do you guys think? Is there another way to achieve this?