Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3316

Keeping JCO context in java servlet

$
0
0

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?


Viewing all articles
Browse latest Browse all 3316

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>