Oracle ADF 12C : JBO-28102: A request was timed out while waiting for a resource to be returned to the resource pool

Hello Everyone,

JBO Exception : JBO-28102 - A Request was timed out while waiting for a Resource

Introduction :  In this post, I would like to explain you a generic JBO exception in Oracle ADF that throws an exception when there are no resources available to accommodate the new connection in the connection pool.

In my project we have implemented a Web service using Oracle ADF SDO(Service Data Objects) to expose CRUD operations on the Business components. After the deployment in WebLogic server, we started observing the exceptions in server logs with the error message "JBO-28102 - A Request was timed out while waiting for a Resource". This exception normally happens when there is no available resource to allocate new database connection. 
To avoid such exceptions, there are options such as tuning connection pool configurations besides that, Below two other solutions that we have tried to resolve this issue, I believe any one of these will be useful for your use case.

Solution

Approach - 1: Disconnect upon release option at Application Module Local Configuration.

Please find below the screenshot for reference - These configurations can be found in BC4J.xml file in your Model project.





Approach -2 : Programmatic approach to release the database connection at the end of Java method.
 
Below custom logic resides inside the custom Java Method which is exposed as a webservice method/Custom Method, below code is sample to implement the same functionality programmatically.

ApplicationModule am =null;
Try{
            String amDef =
                "oracle.erp.xyz.model.am.EmployeesAM";
            String config = "EmployeesAMLocal";
            am = Configuration.createRootApplicationModule(amDef, config);

// Business Logic here
.
.
.
// Closes the database connection but retain view objects cache state when it is true
this.getDBTransaction().disconnect(true); 

}catch( Exception exception){
 // Catch statements
}
// Finally Block to release the Root Application Module connection
finally{
            if(null != am){
                logger.info("inside method to Release Root Application Module");
                Configuration.releaseRootApplicationModule(am, false);
            }
}

Happy Learning...!

Please share your valuable feedback 😊

Comments

Popular posts from this blog

Common Errors - Invoking Oracle Stored procedure from MuleSoft 4.0 - DateTime formats and Default values

JDev/ADF -- Programmatically Deleting selected rows in ADF Table

Apache Camel K Installation Process In a nutshell