Configuring the use of class loaders by an application
You can configure whether your application and web modules use their own class loaders to load classes or use different class loaders, as well as configure the reloading of classes when application files are updated. Class loaders enable an application to access repositories of available classes and resources.
Before you begin
This topic assumes that your application or module is already deployed on a server.
支援的配置: 對於 IBM® 延伸和連結檔而言,.xmi 或 .xml 副檔名取決於您是使用 Java EE 5 之前的應用程式或模組,或 Java™ EE 5 或更新版本的應用程式或模組。
IBM 延伸或連結檔稱為 ibm-*-ext.xmi 或 ibm-*-bnd.xmi,其中 * 是延伸或連結檔的類型,例如:app、application、ejb-jar 或 web。
適用的條件如下:不過,即使應用程式含有 Java EE 5 之前的檔案,且所用的副檔名是 .xmi,其中也可以有 Java EE 5 或更新版本的模組。
ibm-webservices-ext.xmi、ibm-webservices-bnd.xmi、ibm-webservicesclient-bnd.xmi、ibm-webservicesclient-ext.xmi 和 ibm-portlet-ext.xmi 檔會繼續使用 .xmi 副檔名。
sptcfgAbout this task
Class loaders affect whether your application and its modules find the resources that they need to run effectively. You can select whether your application and web modules use their own class loaders to load classes, or use a parent class loader.
An application class loader groups Enterprise JavaBeans (EJB) modules, shared libraries, resource adapter archives (RAR files), and dependency Java archive (JAR) files associated to an application. Dependency JAR files are JAR files that contain code which can be used by both enterprise beans and servlets.
An application class loader is the parent of a web application archive (WAR) class loader. By default, a web module has its own WAR class loader to load the contents of the web module. The WAR class-loader policy value of an application class loader determines whether the WAR class loader or the application class loader is used to load the contents of the Web module.
You can also select whether classes are reloaded when application files are updated. For EJB modules or any non-web modules, enabling class reloading causes the application server run time to stop and start the application to reload application classes. For web modules such as servlets and JavaServer Pages (JSP) files, a web container reloads a web module only when the IBM extension reloadingEnabled in the ibm-web-ext.xmi file is set to true.
To configure use of class loaders by your application and web modules, use the Class loading and update detection page of the administrative console.
Procedure
Results
The application or module configuration is changed. The application or stand-alone web module is restarted so the changes take effect.
What to do next
Save changes to your administrative configuration.
![[IBM i]](../images/iseries.gif)
![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
作業主題