onal resin configuration file // beans.addBeansXml("resin-context.xml"); beans.addModule("test.jar"); beans.start(); RequestContext req = beans.beginRequest(); try { MyMain main = beans.getInstance(MyMain.class); main.main(args); } finally { req.close(); } beans.close(); }
Configuration File
The optional configuration file for the ResinContext allows the same environment and bean configuration as the resin-web.xml, but without the servlet-specific configuration.
<beans xmlns="http://caucho.com/ns/resin" xmlns:resin="urn:java:com.caucho.resin"> <resin:import path="${__DIR__}/my-include.xml"/> <database name="my-database"> <driver ...> ... </driver> </database> <mypkg:MyBean xmlns:mypkg="urn:java:com.mycom.mypkg"> <my-property>my-data</my-property> </mypkg:MyBean> </beans>