Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How should I incorporate db.jar and the db native library into a Tomcat or other J2EE application servers?

0
Posted

How should I incorporate db.jar and the db native library into a Tomcat or other J2EE application servers?

0

Tomcat and other J2EE application servers have the ability to rebuild and reload code automatically. When using Tomcat this is the case when “reloadable” is set to “true”. If your WAR file includes the db.jar it too will be reloaded each time your code is reloaded. This causes exceptions as the native library can’t be loaded more than once and there is no way to unload native code. The solution is to place the db.jar in $TOMCAT_HOME/common/lib and let Tomcat load that library once at start time rather than putting it into the WAR that gets reloaded over and over. • Can I use the Berkeley DB Java API from within a EJB, a Servlet or a JSP page? Yes. The Berkeley DB Java API can be used from within all the popular J2EE application servers in many different ways. • During one of the first calls to the Berkeley DB Java API, a DbException is thrown with a “Bad file number” or “Bad file descriptor” message. There are known large-file support bugs under JNI in various releases of the JDK. Plea

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123