uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

4.2.7 Precautions concerning the acquisition of a class loader

When you acquire the class loaders of Cosminexus Component Container from the codes within the J2EE application and use the following APIs, the java.net.JarURLConnection class will be used:

By expanding the above methods, the openConnection method of the java.net.JarURLConnection class will be invoked, and the JAR file specified in the corresponding URL will be opened. You must perform the operations concerning the JAR file, and therefore, when the openConnection method of the java.netJarURLConnection class is used, make sure to invoke the close method of the JarFile instance to be returned by getJarFile of java.net.JarURLConnection. If the close method is not invoked explicitly, the JAR file will remain open and cannot be deleted. Furthermore, do not use the above methods in a J2EE application.