您是否在生产中使用逆向类加载?
我们使用动态类加载来加载用户的库。
多个单例对象被不同的类加载器同时加载。
Multiple singletons simultaneously loaded by different class loaders.
您控制了父-子、子-父委托的类加载器。
You control the classloader for parent-child child-parent delegation.
可以使用动态类加载技术确保加载正确的bean集合。
You can use dynamic class loading techniques to ensure the correct set of beans is loaded.
由于类加载的一些独特特性,因此这个需求变得更加强烈。
Due to some peculiarities of class loading, the requirement is even stronger.
修改类加载器结构应该使应用程序能够成功迁移。
Modifying the classloader structure should allow the application to migrate successfully.
这些库的版本和类加载器对于每个平台都是不同的。
The versions of these libraries and the class loaders are different for each platform.
展示JIT编译、类加载器信息和垃圾收集的图形。
Graph showing JIT compilations, class loader information, and garbage collection.
要使用动态的类加载器的话,我们首先必须创建它们。
To make use of dynamic classloaders we must first create them.
类加载器有一个十分严格的安全管理器来限制恶意调用。
The class loader has a fairly tight security manager in place that restricts malicious calls.
类加载器的父类加载器将是当前线程上下文的类加载器。
The parent of this class loader will be the class loader of the current thread context.
更新上个月的代码以使用自定义类加载器方法是很容易的。
Updating the code from last month to use the custom classloader approach is easy.
类加载器实例加载的类由加载器的名称空间和类名惟一标识。
A class loaded by a class loader instance is uniquely identified by that class loaders namespace and the class name.
这里我们使用应用程序名作为类加载器的名称,以避免重复。
Each EAR application should have a unique string name for the class loader. Here, we use the application name in the class loader name to avoid repetition.
然后使用这些类加载XML数据,将其中的数据序列化为 XML。
Then you work with those classes, loading XML data into them and then serializing their data back to XML.
您可以看到也对应于应用程序运行的JIT编译和类加载事件。
You can see the JIT compilations and class-loading events that also corresponded to the application running.
然后选择创建的类加载器并单击libraries链接。
Then select the created classloader and click the libraries link.
第一种方法是在出现大量类加载器时鼓励进行额外的保留区收集。
The first is to encourage additional tenure collections in the presence of large amounts of class loaders.
例如,假设您有一个名为MyClassLoader的类加载器。
For example, suppose you have a class loader called MyClassLoader.
SOAP连接器使用的变换框架利用特殊的类加载程序来执行变换。
The transformation framework employed by the SOAP connector uses special class loaders to perform these transformations.
服务器端组件类的不同版本应该尽量使用不同的类加载器使其分离开来。
Different versions of server side component classes should be isolated using different class loaders whenever possible.
它还展示了类加载器信息——再说一遍,这很简单,因为应用程序太简单了。
It also shows class loader information — again, this is simple because the application is so simple.
同样,不能加载这些JAR文件的多个版本,因为类都位于系统类加载器名称空间中。
Also, you will not be able load multiple versions of these JAR files as the classes will all be in the system class loaders namespace.
动态类加载是动态jit编译器面临的一个挑战,也是AOT编译的一个更重要的问题。
Dynamic class loading, which is a challenge for the dynamic JIT compiler, is an even more significant issue for AOT compilation.
当应用程序重启但它们的类加载器没有清理时,将发生应用程序类加载器泄露。
An application class loader leak occurs when applications are restarted but their class loaders are not cleaned up.
如果类加载器几乎没有定义任何的类实例,那么这个类加载器很可能是空闲的。
If next to no instances of classes are defined by a classloader, then it is likely that the classloader is idle.
这里,我们使用反射的原因是因为我们已经使用非系统类加载器加载了应用程序。
Here, we use reflection because we have loaded the application using a class loader that is not the system class loader.
从附加属性部分选择classloader,然后选择此处显示的类加载程序。
Select classloader from the additional properties section, and select the classloader displayed here.
真正的实现可能需要其他自定义类加载器,该加载器将搜索为编译提供的某些类路径。
A real implementation may need another custom class loader that would search through some classpath provided just for the compilation.
应用推荐