I am trying to get connection pooling in JBoss 4.2.2, and for that purpose, I've been reading some JBoss docs. Now, one thing confuses me, is it possible to get connection pooling without modifying JBoss' configs (so that it affects all application), but instead configure pooling for a single application only (like you do in Tomcat with context.xml)? My goal is to be able to give the application to someone without making them reconfigure their server. Since this is easily doable in Tomcat, I presumed it's doable in JBoss, but I can't seem to find a way to do it.
In case it is needed, here's my META-INF/context.xml from Tomcat deployment
and my resource related poriton of WEB-INF/web.xml
I tried deploying to JBoss without any changes, but got a NamingException as jdbc/mysql was never properly bound. I am new to JBoss so I might have said some nonsense. In that case, please bear with me and tell me what I have got wrong.
Thanks for the time. [ October 17, 2008: Message edited by: Veggen Skrikk ]
I assume you are talking about database connection pooling (and not HTTP connection pooling). If so, this is easy to do. The connection pool is defined in the *-ds.xml file. You can provide this file with your application (you can even embed the *-ds.xml file in your EAR), and you can have all of your applications use the same *-ds.xml-defined data source.
Look at docs/examples/jca for example *-ds.xml files for a variety of databases.