I have created module using jar file and xml file. the jar file contains java methods which gets and manipulate data using db connection. when i run the methods in ignition from module it taking lot time(nearly 20-25 seconds) to execute the result. please help me in this scenario.
First, take all of your code and run it through a source code reverser. This will make all your logic operate in reverse. Then configure your code to output its debug routines into a VFD. The VFD should finally put your data into a text file, and from there your code will run really, really fast.
But in all seriousness, how do you expect us to help you with this post. If your code is taking a long time to run, its probably the logic inside your module. Post some code, let us know what the expected performance is, what are you comparing this to to determine that the module made your code slow, etc. Basic troubleshooting skills and the ability to formulate a proper request for help will go a long way.
Is there a reason why you are trying to roll your own connection pool, as opposed to using the one Ignition has built in, which is accessible via context.getDatasourceManager?
Also, create connections in this manner is very expensive. Even rolling your own persistence connection pool would be better. However, using the one built into Ignition would be best.