How do I share a JCo connection pool across different Web applications?
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
The JCo API states that a named pool manager can only exist once per JVM. This does not mean that you can't have multiple pool managers, only that when a pool manager is assigned a name on creation, this name must be unique among any other existing pool managers.
When deploying multiple Web applications, each must reside within is own session context in the application server. If not, then you are likely you get unauthorized sharing of resources between different applications that you did not intend.
In order to share a pool manager, you must use a classloader to load a class that creates the pool manager with the attributes you designate (name, size, etc.). How you create and configure this classloader depends on the Java application server being used. Unless the classloader is in a shared context, your individual Web applications will not be able to "se" it.
Dig Deeper on SAP Java and J2EE
Related Q&A from Austin Sincock
How to provide an SAP R/3 4.5B application server with a Web service interfacecontinue reading
A reader wants to know how to consume a Web service from an SAP 4.6c R/3 application server.continue reading
Are you a Java/J2EE developer interested in SAP? This expert tip lists the most relevant SAP modules and technologies for you.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.