Mantis - Resin
Viewing Issue Advanced Details
4160 minor always 08-04-10 11:21 08-16-10 13:00
ferg  
ferg  
normal  
closed  
fixed  
none    
none 4.0.10  
0004160: connection and transaction in ResinBeanContainer
(rep by Michael Barker)

2) In a couple of our services we don't really need the web server functionality of Resin, but I would like to reuse Resin's connection pool and transaction manager in an embedded manner. Is this possible, if so is there any documentation that relates to doing this. The only documentation I can find about embedding is related to the Web/Servlet engine and Resin 3.1. Ideally I would like to be able to wire the connection pool and transaction manager into our code via Java/Spring.


Notes
(0004726)
ferg   
08-16-10 13:00   
env/11k0

beans = new ResinBeanContainer();
beans.addModule("file:/tmp/caucho/qa/beans");
beans.addBeansXml("file:/tmp/caucho/qa/context.xml");
beans.start();

request = beans.beginRequest();
try {
  ... normal XA and connection here
} finally {
  request.close();
}

The syntax of the context.xml is the same as resin.xml.